[ https://issues.apache.org/jira/browse/CLOUDSTACK-9107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15041413#comment-15041413 ]
ASF GitHub Bot commented on CLOUDSTACK-9107: -------------------------------------------- Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1172#discussion_r46669997 --- 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 -- I can see teh '>=' -> '>' change in the line above. Has this line any logical changes as well? > Description of agent.load.threshold and the actual behavior are not in sync > --------------------------------------------------------------------------- > > Key: CLOUDSTACK-9107 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9107 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server > Affects Versions: 4.5.0, 4.6.0 > Reporter: Koushik Das > Assignee: Koushik Das > Fix For: 4.7.0 > > > Global setting to control agent load balancing threshold > "agent.load.threshold" has a description as "What percentage of the agents > can be held by one management server before load balancing happens" . > When the above setting is set to a value of 1, the behavior in logs is > "Scheduling agent rebalancing task as the average agent load 1.0 is more than > the threshold 1.0" > The ambiguity if re-balancing should happen or not can be fixed either in the > description or in the actual behavior. -- This message was sent by Atlassian JIRA (v6.3.4#6332)