[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-12-30 Thread Animesh Chaturvedi (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Animesh Chaturvedi updated CLOUDSTACK-4506:
---

Assignee: edison su

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Assignee: edison su
>Priority: Critical
> Fix For: 4.3.0
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.destroyVirtualMachine(V

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-12-19 Thread edison su (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

edison su updated CLOUDSTACK-4506:
--

Assignee: (was: edison su)

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Priority: Critical
> Fix For: 4.3.0
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.destroyVirtualMachine(VMEntityManagerImpl.java:259)
> a

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-12-09 Thread Animesh Chaturvedi (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Animesh Chaturvedi updated CLOUDSTACK-4506:
---

Assignee: edison su  (was: Harikrishna Patnala)

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Assignee: edison su
>Priority: Critical
> Fix For: 4.3.0
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManager

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-12-09 Thread Animesh Chaturvedi (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Animesh Chaturvedi updated CLOUDSTACK-4506:
---

Assignee: Harikrishna Patnala  (was: edison su)

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Assignee: Harikrishna Patnala
>Priority: Critical
> Fix For: 4.3.0
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEnt

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-11-25 Thread Animesh Chaturvedi (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Animesh Chaturvedi updated CLOUDSTACK-4506:
---

Assignee: edison su

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Assignee: edison su
>Priority: Critical
> Fix For: 4.3.0
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.destroyVirtualMachine(V

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-11-07 Thread Animesh Chaturvedi (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Animesh Chaturvedi updated CLOUDSTACK-4506:
---


BULK EDIT> These issues are open to be picked up. Help in resolution is 
appreciated.

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Priority: Critical
> Fix For: 4.3.0
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManag

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-11-07 Thread Animesh Chaturvedi (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Animesh Chaturvedi updated CLOUDSTACK-4506:
---


BULK EDIT> These issues are open to be picked up. Help in resolution is 
appreciated.

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Priority: Critical
> Fix For: 4.3.0
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManag

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-10-09 Thread Abhinandan Prateek (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Abhinandan Prateek updated CLOUDSTACK-4506:
---

Fix Version/s: (was: 4.2.1)
   4.3.0

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Priority: Critical
> Fix For: 4.3.0
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.destroyVirtualMachi

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-10-09 Thread Abhinandan Prateek (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Abhinandan Prateek updated CLOUDSTACK-4506:
---

Assignee: (was: Nitin Mehta)

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Priority: Critical
> Fix For: 4.3.0
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.destroyVirtualMachine(VMEntityManagerImpl.j

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-09-04 Thread Abhinandan Prateek (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Abhinandan Prateek updated CLOUDSTACK-4506:
---

Assignee: Nitin Mehta

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Assignee: Nitin Mehta
> Fix For: 4.2.1
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.destroyVirtualMachine(VMEntityManagerImpl.java:

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-09-04 Thread Abhinandan Prateek (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Abhinandan Prateek updated CLOUDSTACK-4506:
---

Priority: Critical  (was: Major)

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Assignee: Nitin Mehta
>Priority: Critical
> Fix For: 4.2.1
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.dest

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-08-26 Thread Animesh Chaturvedi (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Animesh Chaturvedi updated CLOUDSTACK-4506:
---

Priority: Major  (was: Critical)

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
> Fix For: 4.2.1
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.destroyVirtualMachine(VMEntityManagerImpl.java:259)
> at 
> org

[jira] [Updated] (CLOUDSTACK-4506) In a mixed hypervisor setup, destroying a VM whose host has been removed, throws a NPE and the ROOT volume of that VM also is not deleted from the primary.

2013-08-26 Thread Abhinav Roy (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Abhinav Roy updated CLOUDSTACK-4506:


Attachment: CS-4506.zip

> In a mixed hypervisor setup, destroying a VM whose host has been removed, 
> throws a NPE and the ROOT volume of that VM also is not deleted from the 
> primary.
> ---
>
> Key: CLOUDSTACK-4506
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4506
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Storage Controller
>Affects Versions: 4.2.0
> Environment: Advanced zone setup having clusters of different 
> hypervisor types. Ex KVM and VMWARE
>Reporter: Abhinav Roy
>Priority: Critical
> Fix For: 4.2.1
>
> Attachments: CS-4506.zip
>
>
> Steps :
> =
> 1. Deploy a CS 4.2 setup with KVM and VMWARE clusters having one host each.
> 2. Create some VMs on KVM (ex- kvm1 and kvm2)
> 3. Put the KVM host in maintenance mode and then remove the Host. Now kvm1 
> and kvm2 are in stopped state.
> 4. Destroy kvm1 
> Observations :
> 
> 1. when kvm1 is destroyed it fails with the following exception 
> 2013-08-26 13:10:09,205 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,242 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-19:null) submit async job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ], details: AsyncJobVO {id:78, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, instanceId: 
> 3, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, 
> cmdOriginator: null, cmdInfo: 
> {"response":"json","id":"d613f6e5-c53a-4f6b-be31-32f101eb6c99","sessionkey":"bU49tWdfVUJUrq65PbMmzGbe0PE\u003d","cmdEventType":"VM.DESTROY","ctxUserId":"2","httpmethod":"GET","_":"1377502661180","ctxAccountId":"2","ctxStartEventId":"245"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 226870599129537, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-26 13:10:09,245 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.144.6.17 -- GET  
> command=destroyVirtualMachine&id=d613f6e5-c53a-4f6b-be31-32f101eb6c99&response=json&sessionkey=bU49tWdfVUJUrq65PbMmzGbe0PE%3D&_=1377502661180
> 2013-08-26 13:10:09,249 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) Executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-78 = [ 
> 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Destroying vm VM[User|v1]
> 2013-08-26 13:10:09,282 DEBUG [cloud.vm.VirtualMachineManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM is 
> already stopped: VM[User|v1]
> 2013-08-26 13:10:09,308 DEBUG [cloud.capacity.CapacityManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) VM state 
> transitted from :Stopped to Destroyed with event: DestroyRequestedvm's 
> original host id: 1 new host id: null host id before state transition: null
> 2013-08-26 13:10:09,324 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-50:job-78 = [ 8018e79c-a47e-4a54-b3a4-68963f3c11a9 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
> java.lang.NullPointerException
> at 
> com.cloud.capacity.CapacityManagerImpl.releaseVmCapacity(CapacityManagerImpl.java:187)
> at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:718)
> at 
> com.cloud.capacity.CapacityManagerImpl.postStateTransitionEvent(CapacityManagerImpl.java:101)
> at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:117)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:1324)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:1355)
> at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.destroyVirtualMachine(VMEntityManagerImpl.java:259)
>