You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/05/24 10:34:55 UTC

[GitHub] koushik-das commented on a change in pull request #2108: [4.9+] CLOUDSTACK-9860: Power off VMs when force stop is provided

koushik-das commented on a change in pull request #2108: [4.9+] CLOUDSTACK-9860: Power off VMs when force stop is provided
URL: https://github.com/apache/cloudstack/pull/2108#discussion_r118217749
 
 

 ##########
 File path: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
 ##########
 @@ -3150,7 +3150,9 @@ protected Answer execute(StopCommand cmd) {
                     vmMo.setCustomFieldValue(CustomFieldConstants.CLOUD_VM_INTERNAL_NAME, cmd.getVmName());
 
                     if (getVmPowerState(vmMo) != PowerState.PowerOff) {
-                        if (vmMo.safePowerOff(_shutdownWaitMs)) {
+                        if (cmd.isForceStop() && vmMo.powerOff()) {
+                            return new StopAnswer(cmd, "Force stopped VM " + cmd.getVmName() + " Succeed", true);
 
 Review comment:
   Better to keep the response (StopAnswer message) similar for all the HVs. The same should be done for XS and KVM as well.
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services