bug 13944: when delete the account, expunge detached volumes on the backend

status 13944: resolved fixed
Reviewed-by: Frank Zhang
This commit is contained in:
Alena Prokharchyk 2012-02-22 17:57:53 -08:00
parent f619e26c48
commit 6b9abf832b
4 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceInUseException;
import com.cloud.exception.ResourceUnavailableException;
public interface StorageService {
public interface StorageService{
/**
* Create StoragePool based on uri
*

View File

@ -44,7 +44,7 @@ import com.cloud.vm.VMInstanceVO;
import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachineProfile;
public interface StorageManager extends Manager {
public interface StorageManager extends StorageService, Manager {
boolean canVmRestartOnAnotherServer(long vmId);
/** Returns the absolute path of the specified ISO

View File

@ -198,7 +198,7 @@ import com.cloud.vm.dao.UserVmDao;
import com.cloud.vm.dao.VMInstanceDao;
@Local(value = { StorageManager.class, StorageService.class })
public class StorageManagerImpl implements StorageManager, StorageService, Manager, ClusterManagerListener {
public class StorageManagerImpl implements StorageManager, Manager, ClusterManagerListener {
private static final Logger s_logger = Logger.getLogger(StorageManagerImpl.class);
protected String _name;

View File

@ -531,7 +531,7 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
for (VolumeVO volume : volumes) {
if (!volume.getState().equals(Volume.State.Destroy)) {
try {
_storageMgr.destroyVolume(volume);
_storageMgr.deleteVolume(volume.getId());
} catch (Exception ex) {
s_logger.warn("Failed to cleanup volumes as a part of account id=" + accountId + " cleanup due to Exception: ", ex);
accountCleanupNeeded = true;