Merging 6065 into master

This commit is contained in:
abhishek 2010-09-01 13:52:48 -07:00
parent e7d4265500
commit 398e5774ae
2 changed files with 6 additions and 0 deletions

View File

@ -921,6 +921,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

@ -1006,6 +1006,9 @@ 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);