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

ASF subversion and git services commented on CLOUDSTACK-6934:
-------------------------------------------------------------

Commit 92fea032da08938749cde73e312370f1b9da1567 in cloudstack's branch 
refs/heads/4.4-forward from [~alena1108]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=92fea03 ]

CLOUDSTACK-6934: don't try to detach volume from host when volume was never 
allocated to a primary storage


> NPE at VolumeOrchestrator.java:868 during vm expunge when vm has volumes in 
> Allocated state (not created on storage yet)
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-6934
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6934
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.4.0
>            Reporter: Alena Prokharchyk
>            Assignee: Alena Prokharchyk
>             Fix For: 4.5.0
>
>
> Steps to reproduce:
> 1) Deploy 2 vms; VM2 should be deployed with startVm=false option.
> 2) Stop VM1. Detach the Root disks from VM1 and VM2; attach the root disk of 
> VM2 to VM1.
> 3) Try to expunge the VM1 now. NPE happens on 
> INFO  [o.a.c.f.j.i.AsyncJobMonitor] (Work-Job-Executor-2:ctx-228bd156 
> job-890/job-892) Remove job-892 from job monitoring
> WARN  [c.c.v.UserVmManagerImpl] (UserVm-Scavenger-1:ctx-d72384e8) Unable to 
> expunge VM[User|i-2-24-st]
> java.lang.NullPointerException
>       at 
> org.apache.cloudstack.engine.orchestration.VolumeOrchestrator.disconnectVolumesFromHost(VolumeOrchestrator.java:868)
>       at 
> com.cloud.vm.VirtualMachineManagerImpl.advanceExpunge(VirtualMachineManagerImpl.java:528)
>       at 
> com.cloud.vm.VirtualMachineManagerImpl.advanceExpunge(VirtualMachineManagerImpl.java:464)
>       at com.cloud.vm.UserVmManagerImpl.expunge(UserVmManagerImpl.java:1670)
>       at com.cloud.vm.UserVmManagerImpl.expungeVm(UserVmManagerImpl.java:3691)
> NPE happens because in the code we assume that when VM has not null 
> hostId/lastHostId (indicating it had been running at some point), then its 
> volumes should have not null storagepoolId. This assumption is incorrect, and 
> we should check storagePoolId of the volume first before attempting to 
> disconnect it from the host.



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

Reply via email to