Sailaja Mada created CLOUDSTACK-2687: ----------------------------------------
Summary: NPE with deploy VM when there are no resources available Key: CLOUDSTACK-2687 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2687 Project: CloudStack Issue Type: Bug Security Level: Public (Anyone can view this level - this is the default.) Components: Management Server Affects Versions: 4.2.0 Reporter: Sailaja Mada Setup : Advanced Zone Steps : 1. Try to deploy VM when there are resources unavailable ( Host does not enough resources Or host is in alert state ) Observation : 2013-05-27 11:24:18,951 DEBUG [cloud.vm.UserVmManagerImpl] (Job-Executor-57:job-101) Destroying vm VM[User|c8a3fb3f-e264-4b09-b6b6-1e2b07a20df1] as it failed to create on Host with Id:null 2013-05-27 11:24:18,966 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-57:job-101) VM state transitted from :Stopped to Error with event: OperationFailedToErrorvm's original host id: null new host id: null host id before state transition: null 2013-05-27 11:24:18,974 WARN [apache.cloudstack.alerts] (Job-Executor-57:job-101) alertType:: 8 // dataCenterId:: 1 // podId:: 1 // clusterId:: null // message:: Failed to deploy Vm with Id: 11, on Host with Id: null 2013-05-27 11:24:19,322 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-57:job-101) Unexpected exception while executing org.apache.cloudstack.api.command.user.vm.DeployVMCmd java.lang.NullPointerException at com.cloud.vm.UserVmManagerImpl.finalizeStop(UserVmManagerImpl.java:3041) at com.cloud.vm.VirtualMachineManagerImpl.sendStop(VirtualMachineManagerImpl.java:978) at com.cloud.vm.VirtualMachineManagerImpl.cleanup(VirtualMachineManagerImpl.java:1005) at com.cloud.vm.VirtualMachineManagerImpl.advanceStart(VirtualMachineManagerImpl.java:932) at com.cloud.vm.VirtualMachineManagerImpl.start(VirtualMachineManagerImpl.java:547) at org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.deployVirtualMachine(VMEntityManagerImpl.java:227) at org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl.deploy(VirtualMachineEntityImpl.java:209) at com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:3185) at com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:2726) at com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:2712) at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) at org.apache.cloudstack.api.command.user.vm.DeployVMCmd.execute(DeployVMCmd.java:419) at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155) 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-05-27 11:24:19,323 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-57:job-101) Complete async job-101, jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: null 2013-05-27 11:24:20,498 DEBUG [cloud.api.ApiServlet] (catalina-exec-2:null) ===START=== 10.144.6.19 -- GET command=queryAsyncJobResult&jobId=74563444-5481-4145-a0ab-eeeef80e1db4&response=json&sessionkey=6Y8QsASlVJM2%2F%2BzSeYZnDac1lD8%3D&_=1369634220149 -- 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