mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
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:
parent
f619e26c48
commit
6b9abf832b
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user