DaanHoogland commented on code in PR #10624: URL: https://github.com/apache/cloudstack/pull/10624#discussion_r2071497588
########## server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java: ########## @@ -265,36 +266,49 @@ public void scheduleRestartForVmsOnHost(final HostVO host, boolean investigate) s_logger.warn("Scheduling restart for VMs on host " + host.getId() + "-" + host.getName()); final List<VMInstanceVO> vms = _instanceDao.listByHostId(host.getId()); + final List<HaWorkVO> pendingHaWorks = _haDao.listPendingHAWorkForHost(host.getId()); final DataCenterVO dcVO = _dcDao.findById(host.getDataCenterId()); // send an email alert that the host is down StringBuilder sb = null; List<VMInstanceVO> reorderedVMList = new ArrayList<VMInstanceVO>(); - if ((vms != null) && !vms.isEmpty()) { + int skippedHAVms = 0; + if (CollectionUtils.isNotEmpty(vms)) { Review Comment: I think this block could go in its own method. -- 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. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org