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:
abhishek 2010-09-01 13:42:55 -07:00
parent 939f32c7b9
commit 34741d2911
2 changed files with 7 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);