rhtyd closed pull request #2825: expunge if flag is set
URL: https://github.com/apache/cloudstack/pull/2825
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 6f2ae852e12..682bfb9936e 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -1890,6 +1890,13 @@ public void doInTransactionWithoutResult(final
TransactionStatus status) throws
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());
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services