weizhouapache commented on a change in pull request #4647:
URL: https://github.com/apache/cloudstack/pull/4647#discussion_r570161351



##########
File path: 
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
##########
@@ -4498,7 +4498,7 @@ private void 
handlePowerOffReportWithNoPendingJobsOnVM(final VMInstanceVO vm) {
                         String.format("VM %s is at %s and we received a %s 
report while there is no pending jobs on it"
                                 , vm.getInstanceName(), vm.getState(), 
vm.getPowerState()));
             }
-            if(vm.isHaEnabled() && vm.getState() == State.Running
+            if((HighAvailabilityManager.ForceHA.value() || vm.isHaEnabled()) 
&& vm.getState() == State.Running

Review comment:
       @harikrishna-patnala yes,  it is a cluster-scope setting.
   But cloudstack does not consider it before.
   ```
           _forceHA = ForceHA.value();
   ```
   
    same as other cluster-scope settings in 
https://github.com/apache/cloudstack/blob/master/engine/components-api/src/main/java/com/cloud/ha/HighAvailabilityManager.java.
   
   I am wondering if we should fix all of them in a pr.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to