Github user koushik-das commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1172#discussion_r46670189 --- Diff: engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java --- @@ -1411,14 +1411,12 @@ protected void runInContext() { final double managedHostsCount = allManagedRoutingAgents.size(); if (allHostsCount > 0.0) { final double load = managedHostsCount / allHostsCount; - if (load >= ConnectedAgentThreshold.value()) { - s_logger.debug("Scheduling agent rebalancing task as the average agent load " + load + " is more than the threshold " + - ConnectedAgentThreshold.value()); + if (load > ConnectedAgentThreshold.value()) { + s_logger.debug("Scheduling agent rebalancing task as the average agent load " + load + " is more than the threshold " + ConnectedAgentThreshold.value()); scheduleRebalanceAgents(); _agentLbHappened = true; } else { - s_logger.debug("Not scheduling agent rebalancing task as the averages load " + load + " is less than the threshold " + - ConnectedAgentThreshold.value()); + s_logger.debug("Not scheduling agent rebalancing task as the average load " + load + " has not crossed the threshold " + ConnectedAgentThreshold.value()); --- End diff -- That's the only change, nothing else in that line.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---