mirror of https://github.com/apache/cloudstack.git
bug 7528: the vm expunge action wasn't destroying the volumes during vm destroy. Added logic to do that. Also, made sure the volumes are removed during vm expunge
status 7528: resolved fixed
This commit is contained in:
parent
626a03ad78
commit
6eacec782e
|
|
@ -278,5 +278,7 @@ public interface StorageManager extends Manager {
|
|||
|
||||
|
||||
void prepare(VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest) throws StorageUnavailableException, InsufficientStorageCapacityException, ConcurrentOperationException;
|
||||
void release(VirtualMachineProfile<? extends VirtualMachine> vm);
|
||||
//void release(VirtualMachineProfile<? extends VirtualMachine> vm);
|
||||
|
||||
void release(VirtualMachineProfile<? extends VMInstanceVO> profile);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2881,8 +2881,13 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
|||
}
|
||||
|
||||
@Override
|
||||
public void release(VirtualMachineProfile profile) {
|
||||
// Right now we don't do anything.
|
||||
public void release(VirtualMachineProfile<? extends VMInstanceVO> profile) {
|
||||
//Clean up volumes based on the profile's instance id
|
||||
List<VolumeVO> volumesForProfile = _volsDao.findByInstance(profile.getId());
|
||||
|
||||
for(VolumeVO vol : volumesForProfile){
|
||||
destroyVolume(vol);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue