mirror of https://github.com/apache/cloudstack.git
bug 6065: Fixing the issue with the account deletion, in the case where the account is deleted with the volume being created, but not having a pool id associated with it yet
status 6065: resolved fixed
This commit is contained in:
parent
939f32c7b9
commit
34741d2911
|
|
@ -931,6 +931,9 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
// Mark the account's volumes as destroyed
|
||||
List<VolumeVO> volumes = _volumeDao.findDetachedByAccount(accountId);
|
||||
for (VolumeVO volume : volumes) {
|
||||
if(volume.getPoolId()==null){
|
||||
accountCleanupNeeded = true;
|
||||
}
|
||||
_storageMgr.destroyVolume(volume);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1016,6 +1016,10 @@ public class SnapshotManagerImpl implements SnapshotManager {
|
|||
// i.e Call them before the VMs for those volumes are destroyed.
|
||||
boolean success = true;
|
||||
for (VolumeVO volume : volumes) {
|
||||
|
||||
if(volume.getPoolId() == null){
|
||||
continue;
|
||||
}
|
||||
Long volumeId = volume.getId();
|
||||
Long dcId = volume.getDataCenterId();
|
||||
String secondaryStoragePoolURL = _storageMgr.getSecondaryStorageURL(dcId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue