Merge remote-tracking branch 'origin/4.11'

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2018-09-04 13:54:23 +05:30
commit d9236843cb
1 changed files with 7 additions and 0 deletions

View File

@ -1872,6 +1872,13 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
if (!stateTransitTo(vm, VirtualMachine.Event.DestroyRequested, vm.getHostId())) {
s_logger.debug("Unable to destroy the vm because it is not in the correct state: " + vm);
throw new CloudRuntimeException("Unable to destroy " + vm);
} else {
if (expunge) {
if (!stateTransitTo(vm, VirtualMachine.Event.ExpungeOperation, vm.getHostId())) {
s_logger.debug("Unable to expunge the vm because it is not in the correct state: " + vm);
throw new CloudRuntimeException("Unable to expunge " + vm);
}
}
}
} catch (final NoTransitionException e) {
s_logger.debug(e.getMessage());