Skip to content

Commit 0a4e651

Browse files
author
Alena Prokharchyk
committed
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
1 parent 5cd6d69 commit 0a4e651

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ private void scanDirectAgentToLoad() {
173173
s_logger.trace("Begin scanning directly connected hosts");
174174
}
175175

176-
// for agents that are self-managed, threshold to be considered as disconnected is 3 ping intervals
177-
long cutSeconds = (System.currentTimeMillis() >> 10) - (_pingInterval * 3);
176+
// for agents that are self-managed, threshold to be considered as disconnected after pingtimeout
177+
long cutSeconds = (System.currentTimeMillis() >> 10) - (_pingTimeout);
178178
List<HostVO> hosts = _hostDao.findAndUpdateDirectAgentToLoad(cutSeconds, _loadSize, _nodeId);
179179
List<HostVO> appliances = _hostDao.findAndUpdateApplianceToLoad(cutSeconds, _nodeId);
180180
hosts.addAll(appliances);

0 commit comments

Comments
 (0)