CLOUDSTACK-3079: Use global var "ping.timeout" as a multiplier to ping.interval before announcing an agent has timed out. The multiplier used to be hardcoded to 3

This commit is contained in:
Alena Prokharchyk 2013-06-19 14:38:25 -07:00
parent 5cd6d6944a
commit 0a4e65126f

View File

@ -173,8 +173,8 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
s_logger.trace("Begin scanning directly connected hosts");
}
// for agents that are self-managed, threshold to be considered as disconnected is 3 ping intervals
long cutSeconds = (System.currentTimeMillis() >> 10) - (_pingInterval * 3);
// for agents that are self-managed, threshold to be considered as disconnected after pingtimeout
long cutSeconds = (System.currentTimeMillis() >> 10) - (_pingTimeout);
List<HostVO> hosts = _hostDao.findAndUpdateDirectAgentToLoad(cutSeconds, _loadSize, _nodeId);
List<HostVO> appliances = _hostDao.findAndUpdateApplianceToLoad(cutSeconds, _nodeId);
hosts.addAll(appliances);