angeline shen created CLOUDSTACK-1619: -----------------------------------------
Summary: Baremetal - Restore/reset VM fail with java.lang.NullPointerException Key: CLOUDSTACK-1619 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1619 Project: CloudStack Issue Type: Bug Security Level: Public (Anyone can view this level - this is the default.) Components: Baremetal, Management Server Affects Versions: 4.1.0 Environment: MS ASF 4.1 build 70 host baremetal guest OS centos 6.3 Reporter: angeline shen Assignee: frank zhang Priority: Critical Fix For: 4.1.0 1. create basic zone baremetal network type. Add DHCP PXE server. Add baremetal host, template centos 6.3. Deploy VM with baremetal template centos 6.3 2. Reset/restore VM. 2013-03-08 21:10:54,480 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-10:null) submit async job-29, details: AsyncJobVO {id:29, userId: 2, accountId: 2, sessionKey: null, instanceType: null, instanceId: null, cmd: org .apache.cloudstack.api.command.user.vm.RestoreVMCmd, cmdOriginator: null, cmdInfo: {"response":"json","sessionkey":"kQqK9pFlb8STcoZbZ+OqzBtxXng\u003d","virtualmachineid":"562e36e8-36ec-4d0b-8341-ff869bb0483d","ctxUserId":"2"," _":"1362795715779","ctxAccountId":"2","ctxStartEventId":"37"}, cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, resultCode: 0, result: null, initMsid: 206915885079873, completeMsid: null, las tUpdated: null, lastPolled: null, created: null} 2013-03-08 21:10:54,481 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-29:job-29) Executing org.apache.cloudstack.api.command.user.vm.RestoreVMCmd for job-29 2013-03-08 21:10:54,488 DEBUG [cloud.api.ApiServlet] (catalina-exec-10:null) ===END=== 10.216.133.70 -- GET command=restoreVirtualMachine&virtualmachineid=562e36e8-36ec-4d0b-8341-ff869bb0483d&response=json&sessionkey=kQqK9pF lb8STcoZbZ%2BOqzBtxXng%3D&_=1362795715779 2013-03-08 21:10:54,503 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-29:job-29) Unexpected exception while executing org.apache.cloudstack.api.command.user.vm.RestoreVMCmd java.lang.NullPointerException at com.cloud.vm.UserVmManagerImpl.restoreVM(UserVmManagerImpl.java:4768) 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:616) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) at com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:37) at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy252.restoreVM(Unknown Source) at org.apache.cloudstack.api.command.user.vm.RestoreVMCmd.execute(RestoreVMCmd.java:61) at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:163) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) at com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:37) at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) at com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679) 2013-03-08 21:10:54,504 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-29:job-29) Complete async job-29, jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: null 2013-03-08 21:10:56,633 INFO [agent.manager.AgentMonitor] (Thread-6:null) Found the following agents behind on ping: [1, 3] -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira