DaanHoogland commented on code in PR #11573: URL: https://github.com/apache/cloudstack/pull/11573#discussion_r2330459481
########## server/src/main/java/org/apache/cloudstack/vm/schedule/VMSchedulerImpl.java: ########## @@ -190,6 +196,11 @@ public boolean start() { final TimerTask schedulerPollTask = new ManagedContextTimerTask() { @Override protected void runInContext() { + ManagementServerHostVO msHost = managementServerHostDao.findOneInUpStateByLongestRuntime(); + if (msHost == null || (msHost.getMsid() != ManagementServerNode.getManagementServerId())) { + logger.debug("Skipping the vm scheduler poll task on this management server"); + return; + } Review Comment: imagine the longest running server was the second server, because the first was decommissioned. We now have no schedule task. we need to shutdown all servers and start them up one by one again, right? -- 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