mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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){
|
public void cleanupVolumes(Long vmId){
|
||||||
List<VolumeVO> volumesForVm = _volsDao.findByInstance(vmId);
|
List<VolumeVO> volumesForVm = _volsDao.findByInstance(vmId);
|
||||||
for(VolumeVO vol : volumesForVm){
|
for(VolumeVO vol : volumesForVm){
|
||||||
destroyVolume(vol);
|
if(vol.getVolumeType().equals(VolumeType.ROOT)){
|
||||||
|
destroyVolume(vol);
|
||||||
|
} else {
|
||||||
|
//data volume
|
||||||
|
_volsDao.detachVolume(vol.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user