[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14082450#comment-14082450
 ] 

Alena Prokharchyk commented on CLOUDSTACK-7209:
-----------------------------------------------

2 problems need to be addressed as a part of the bug:

1) NPE happened because implementNetwork returned null to createNic call, and 
the call doesn't handle null values. So need to add the condition for taking 
care of NULL return value, and instead of NPE, throw an exception.
2) Have to find out why null was returned from implementNetwork code. From the 
code, it seems like it happens only when the following exception is caught:

 } catch (NoTransitionException e) {
            s_logger.error(e.getMessage());
            return null;

We have to figure out why NoTransition happened during network implement. 
Something might have changed the network state in between of the operation, and 
the state transition failed during the network implement. 

> [Automation] NPE observed in the CI Simulator Run on master
> -----------------------------------------------------------
>
>                 Key: CLOUDSTACK-7209
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7209
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.5.0
>         Environment: CI
>            Reporter: Raja Pullela
>            Assignee: Alena Prokharchyk
>            Priority: Critical
>
> Following NPE is observed on the CI Env:
> 02:17:16,156 DEBUG [o.a.c.e.o.NetworkOrchestrator] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Lock is 
> released for network Ntwk[222|Guest|11] as a part of network shutdown
> 2014-07-28 02:17:16,156 DEBUG [o.a.c.e.o.NetworkOrchestrator] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Lock is 
> released for network id 222 as a part of network implement
> 2014-07-28 02:17:16,158 WARN  [c.c.n.r.VpcVirtualNetworkApplianceManagerImpl] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Failed to 
> add router VM[DomainRouter|r-38-VM] to network Ntwk[222|Guest|11] due to 
> java.lang.NullPointerException
>       at 
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.createNicForVm(NetworkOrchestrator.java:3077)
>       at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateAddVmToNetwork(VirtualMachineManagerImpl.java:3409)
>       at 
> com.cloud.vm.VirtualMachineManagerImpl.addVmToNetwork(VirtualMachineManagerImpl.java:3355)
>       at 
> com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl.addVpcRouterToGuestNetwork(VpcVirtualNetworkApplianceManagerImpl.java:267)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>       at 
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>       at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>       at com.sun.proxy.$Proxy191.addVpcRouterToGuestNetwork(Unknown Source)
>       at 
> com.cloud.network.element.VpcVirtualRouterElement.implement(VpcVirtualRouterElement.java:187)
>       at 
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.implementNetworkElementsAndResources(NetworkOrchestrator.java:1088)
>       at 
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.implementNetwork(NetworkOrchestrator.java:995)
>       at 
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepare(NetworkOrchestrator.java:1282)
>       at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:985)
>       at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:5146)
>       at sun.reflect.GeneratedMethodAccessor358.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
>       at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5302)
>       at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
>       at 
> org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:503)
>       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:460)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:744)
> 2014-07-28 02:17:16,160 DEBUG [c.c.n.r.VpcVirtualNetworkApplianceManagerImpl] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Removing the 
> router VM[DomainRouter|r-38-VM] from network Ntwk[222|Guest|11] as a part of 
> cleanup
> 2014-07-28 02:17:16,161 DEBUG [c.c.n.r.VpcVirtualNetworkApplianceManagerImpl] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Router 
> VM[DomainRouter|r-38-VM] is not a part of the Guest network Ntwk[222|Guest|11]
> 2014-07-28 02:17:16,161 DEBUG [c.c.n.r.VpcVirtualNetworkApplianceManagerImpl] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Removed the 
> router VM[DomainRouter|r-38-VM] from network Ntwk[222|Guest|11] as a part of 
> cleanup
> 2014-07-28 02:17:16,161 DEBUG [o.a.c.e.o.NetworkOrchestrator] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Cleaning up 
> because we're unable to implement the network Ntwk[222|Guest|11]
> 2014-07-28 02:17:16,169 DEBUG [o.a.c.e.o.NetworkOrchestrator] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Lock is 
> acquired for network Ntwk[222|Guest|11] as a part of network shutdown
> 2014-07-28 02:17:16,174 DEBUG [o.a.c.e.o.NetworkOrchestrator] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Releasing 0 
> port forwarding rules for network id=222 as a part of shutdownNetworkRules
> 2014-07-28 02:17:16,174 DEBUG [c.c.n.f.FirewallManagerImpl] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) There are no 
> rules to forward to the network elements
> 2014-07-28 02:17:16,175 DEBUG [o.a.c.e.o.NetworkOrchestrator] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Releasing 0 
> static nat rules for network id=222 as a part of shutdownNetworkRules
> 2014-07-28 02:17:16,175 DEBUG [c.c.n.f.FirewallManagerImpl] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) There are no 
> rules to forward to the network elements
> 2014-07-28 02:17:16,175 DEBUG [c.c.n.l.LoadBalancingRulesManagerImpl] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) Revoking 0 
> Public load balancing rules for network id=222
> 2014-07-28 02:17:16,176 DEBUG [c.c.n.l.LoadBalancingRulesManagerImpl] 
> (Work-Job-Executor-72:ctx-6d23d8df job-215/job-216 ctx-cb3c4a4d) There are no 
> Load Balancing Rules to forward to the network elements



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to