Dear Cloudstack-Developers,
a Network restart triggered using the UI (without "Clean up" and without "Make
redundant" enabled) fails with:
"Can't find all necessary running routers!"
I have looked up the source code for it and came to the following relevant
snippet in
server/src/main/java/com/cloud/network/element/VirtualRouterElement.java
starting at line 234:
###
if (offering.isRedundantRouter() || network.isRollingRestart()) {
expectedRouters = 2;
}
###
From the log files I see that a rollingRestart is indeed triggered, but why
does it expect two routers then? Because there might be two routers running
simultaneously during the restart? If that was the case, then why in the
following lines, relevant snippet (starting at line 237):
###
if (routers == null || routers.size() < expectedRouters) {
//we might have a router which is already deployed and running.
//so check the no of routers in network currently.
List<DomainRouterVO> current_routers =
_routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
if (current_routers.size() < 2) {
updateToFailedState(network);
throw new ResourceUnavailableException("Can't find all
necessary running routers!", DataCenter.class, network.getDataCenterId());
}
}
###
is throwing an Exception when current_routers.size() is smaller than 2 and not
smaller than 1?
I understand that the logic is designed towards more complex networks, but will
this logic not always fails for an already implemented BASIC network on KVM,
with no redudant routers enabled and one VR already active?
Please let me know what I am missing, I attach the relevant log file inline at
the end of this message.
Sincerely,
Thomas Moroder
--
Incubatec GmbH - Srl
Via Scurcia'str. 36, 39046 Ortisei(BZ), ITALIA
Registered with the chamber of commerce of Bolzano the 8th of November 2001 with
REA-No. 168204 (s.c. of EUR 10.000 f.p.u.)
President: Thomas Moroder, VAT-No. IT 02283140214
Tel: +39.0471796829 - Fax: +39.0471797949
IMPRINT:
http://www.incubatec.com/imprint.html
PRIVACY:
http://www.server24.it/informativa_completa.html
LOG EXCERPT:
2019-01-03 09:10:10,121 DEBUG [c.c.a.ApiServlet]
(qtp1386767190-2050:ctx-2b7a6f6a ctx-6492145f) (logid:a2592d32) ===END===
95.249.105.210 -- GET
command=restartNetwork&response=json&id=a8633f4d-f380-412a-bb90-1ee701882807&cleanup=true&makeredundant=false&_=1546503004256
2019-01-03 09:10:10,131 DEBUG [o.a.c.e.o.NetworkOrchestrator]
(API-Job-Executor-14:ctx-05c7da8c job-23242 ctx-bbb96ab9) (logid:42a53762)
Restarting network 212...
2019-01-03 09:10:10,132 DEBUG [o.a.c.e.o.NetworkOrchestrator]
(API-Job-Executor-14:ctx-05c7da8c job-23242 ctx-bbb96ab9) (logid:42a53762)
Performing rolling restart of routers of network Ntwk[212|Guest|6]
2019-01-03 09:10:10,137 DEBUG [o.a.c.e.o.NetworkOrchestrator]
(API-Job-Executor-14:ctx-05c7da8c job-23242 ctx-bbb96ab9) (logid:42a53762)
Asking VirtualRouter to implemenet Ntwk[212|Guest|6]
2019-01-03 09:10:10,146 ERROR [c.c.a.ApiAsyncJobDispatcher]
(API-Job-Executor-14:ctx-05c7da8c job-23242) (logid:42a53762) Unexpected
exception while executing
org.apache.cloudstack.api.command.user.network.RestartNetworkCmd
com.cloud.exception.ResourceUnavailableException: Resource [DataCenter:3] is
unreachable: Can't find all necessary running routers!
at
com.cloud.network.element.VirtualRouterElement.implement(VirtualRouterElement.java:243)
at
org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.implementNetworkElements(NetworkOrchestrator.java:1203)
at
org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.rollingRestartRouters(NetworkOrchestrator.java:2948)
at
org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.restartNetwork(NetworkOrchestrator.java:2853)
at
com.cloud.network.NetworkServiceImpl.restartNetwork(NetworkServiceImpl.java:1883)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:338)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:174)
at
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:174)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy230.restartNetwork(Unknown Source)
at
org.apache.cloudstack.api.command.user.network.RestartNetworkCmd.execute(RestartNetworkCmd.java:99)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
at
com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:108)
at
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:581)
at
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
at
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:529)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)