mirror of https://github.com/apache/cloudstack.git
bug 7677: fixing the volumes issue when we destroy a vm
status 7677: resolved fixed
This commit is contained in:
parent
aeb4c460da
commit
bb7170884d
|
|
@ -2795,7 +2795,12 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
|||
public void cleanupVolumes(Long vmId){
|
||||
List<VolumeVO> volumesForVm = _volsDao.findByInstance(vmId);
|
||||
for(VolumeVO vol : volumesForVm){
|
||||
destroyVolume(vol);
|
||||
if(vol.getVolumeType().equals(VolumeType.ROOT)){
|
||||
destroyVolume(vol);
|
||||
} else {
|
||||
//data volume
|
||||
_volsDao.detachVolume(vol.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue