Skip to content

Commit d923684

Browse files
committed
Merge remote-tracking branch 'origin/4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 parents 494f708 + eb3953f commit d923684

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,6 +1872,13 @@ public void doInTransactionWithoutResult(final TransactionStatus status) throws
18721872
if (!stateTransitTo(vm, VirtualMachine.Event.DestroyRequested, vm.getHostId())) {
18731873
s_logger.debug("Unable to destroy the vm because it is not in the correct state: " + vm);
18741874
throw new CloudRuntimeException("Unable to destroy " + vm);
1875+
} else {
1876+
if (expunge) {
1877+
if (!stateTransitTo(vm, VirtualMachine.Event.ExpungeOperation, vm.getHostId())) {
1878+
s_logger.debug("Unable to expunge the vm because it is not in the correct state: " + vm);
1879+
throw new CloudRuntimeException("Unable to expunge " + vm);
1880+
}
1881+
}
18751882
}
18761883
} catch (final NoTransitionException e) {
18771884
s_logger.debug(e.getMessage());

0 commit comments

Comments
 (0)