Merge pull request #1172 from koushik-das/CLOUDSTACK-9107

CLOUDSTACK-9107: Description of global config agent.load.threshold and the actual behavior are not in sync

Made configuration parameter description and behavior in sync.

* pr/1172:
  CLOUDSTACK-9107: Description of global config agent.load.threshold and the actual behavior are not in sync Made configuration parameter description and behavior in sync.

Signed-off-by: Remi Bergsma <github@remi.nl>
This commit is contained in:
Remi Bergsma 2015-12-04 19:29:17 +01:00
commit 2093c33ebd
1 changed files with 3 additions and 5 deletions

View File

@ -1411,14 +1411,12 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
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());
}
}
}