manasaveloori created CLOUDSTACK-6737:
-----------------------------------------
Summary: NPE when deploying user VM using a guest OS which is
removed.
Key: CLOUDSTACK-6737
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6737
Project: CloudStack
Issue Type: Bug
Security Level: Public (Anyone can view this level - this is the default.)
Components: XenServer
Affects Versions: 4.4.0
Reporter: manasaveloori
Priority: Critical
Fix For: 4.4.0
1. Add a guest Os.
2. Adding mapping for the guest Os to hypervisor.
3. Register ISO/template using the above added OS type.
4. Now remove the guest OS
mysql> select * from guest_os where display_name="testcentos";
+-----+-------------+------+--------------------------------------+--------------+---------------------+---------------------+-----------------+
| id | category_id | name | uuid |
display_name | created | removed | is_user_defined |
+-----+-------------+------+--------------------------------------+--------------+---------------------+---------------------+-----------------+
| 231 | 1 | test | 01670dea-fa05-4046-a068-88032b9a83ed | testcentos
| 2014-05-20 19:59:35 | 2014-05-21 15:18:18 | 1 |
+-----+-------------+------+--------------------------------------+--------------+---------------------+---------------------+-----------------+
1 row in set (0.00 sec)
5. Now deploy user VM using the above registered ISO/template.
Observed NPE:
2014-05-21 12:22:03,824 DEBUG [c.c.n.NetworkModelImpl]
(catalina-exec-18:ctx-88f453ca ctx-f7949c50) Service SecurityGroup is not
supported in the network id=206
2014-05-21 12:22:03,834 DEBUG [c.c.u.d.T.Transaction]
(catalina-exec-18:ctx-88f453ca ctx-f7949c50) Rolling back the transaction: Time
= 1 Name = catalina-exec-18; called by
-TransactionLegacy.rollback:903-TransactionLegacy.removeUpTo:846-TransactionLegacy.close:670-Transaction.execute:41-UserVmManagerImpl.commitUserVm:2902-UserVmManagerImpl.createVirtualMachine:2840-UserVmManagerImpl.createAdvancedVirtualMachine:2543-NativeMethodAccessorImpl.invoke0:-2-NativeMethodAccessorImpl.invoke:57-DelegatingMethodAccessorImpl.invoke:43-Method.invoke:606-AopUtils.invokeJoinpointUsingReflection:317
2014-05-21 12:22:03,841 ERROR [c.c.a.ApiServer] (catalina-exec-18:ctx-88f453ca
ctx-f7949c50) unhandled exception executing api command:
[Ljava.lang.String;@6e401408
java.lang.NullPointerException
at
com.cloud.vm.UserVmManagerImpl$3.doInTransaction(UserVmManagerImpl.java:2969)
at
com.cloud.vm.UserVmManagerImpl$3.doInTransaction(UserVmManagerImpl.java:2902)
at com.cloud.utils.db.Transaction.execute(Transaction.java:37)
at
com.cloud.vm.UserVmManagerImpl.commitUserVm(UserVmManagerImpl.java:2902)
at
com.cloud.vm.UserVmManagerImpl.createVirtualMachine(UserVmManagerImpl.java:2840)
at
com.cloud.vm.UserVmManagerImpl.createAdvancedVirtualMachine(UserVmManagerImpl.java:2543)
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.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:106)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
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.$Proxy206.createAdvancedVirtualMachine(Unknown Source)
at
org.apache.cloudstack.api.command.user.vm.DeployVMCmd.create(DeployVMCmd.java:600)
at
com.cloud.api.dispatch.CommandCreationWorker.handle(CommandCreationWorker.java:47)
at com.cloud.api.dispatch.DispatchChain.dispatch(DispatchChain.java:37)
at com.cloud.api.ApiDispatcher.dispatchCreateCmd(ApiDispatcher.java:79)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:614)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506)
at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330)
at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54)
at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118)
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 com.cloud.api.ApiServlet.processRequest(ApiServlet.java:115)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2274)
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-05-21 12:22:03,845 DEBUG [c.c.a.ApiServlet] (catalina-exec-18:ctx-88f453ca
ctx-f7949c50) ===END=== 10.252.193.36 -- GET
command=deployVirtualMachine&response=json&sessionkey=zrUbANZurPfpHF7puSW8ZmCkHk8%3D&zoneid=d0074673-817c-4594-8cba-bfefb22502df&templateid=951fa685-512f-445c-9fe0-5a03da1b42fd&hypervisor=XenServer&serviceofferingid=f34c7798-1769-4519-be4a-ba49837738fd&iptonetworklist%5B0%5D.networkid=e6f26a38-c912-47fe-923d-1c33e78470f7&_=1400655137048
--
This message was sent by Atlassian JIRA
(v6.2#6252)