rhtyd commented on a change in pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#discussion_r574328960



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -964,6 +964,15 @@ private UserVm rebootVirtualMachine(long userId, long 
vmId, boolean enterSetup)
         if (vm.getState() == State.Running && vm.getHostId() != null) {
             collectVmDiskStatistics(vm);
             collectVmNetworkStatistics(vm);
+
+            if (forced) {
+                Host vmOnHost = _hostDao.findById(vm.getHostId());
+                if (vmOnHost == null || vmOnHost.getResourceState() != 
ResourceState.Enabled || vmOnHost.getStatus() != Status.Up ) {

Review comment:
       @sureshanaparti is this a new behaviour, did it use to throw 
exception/fail when host is not enabled or up without forced=true?




----------------------------------------------------------------
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