From 893eed9863c04bad62f0a0da27f61bd15394d9fb Mon Sep 17 00:00:00 2001 From: Edison Su Date: Thu, 16 Oct 2014 16:59:09 -0700 Subject: [PATCH] There are few cases that mgt server won't reponse agent's pingcommand timely, or in KVM's case, libvirt won't repsonse in few mintues, which will cause agent reconnect to mgt server, then all the on going tasks on host will fail --- agent/src/com/cloud/agent/Agent.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agent/src/com/cloud/agent/Agent.java b/agent/src/com/cloud/agent/Agent.java index 8a3433304dc..7d5f7b1d7d9 100755 --- a/agent/src/com/cloud/agent/Agent.java +++ b/agent/src/com/cloud/agent/Agent.java @@ -578,9 +578,7 @@ public class Agent implements HandlerFactory, IAgentControl { final Object obj = task.get(); if (obj instanceof Response) { if ((System.currentTimeMillis() - _lastPingResponseTime) > _pingInterval * _shell.getPingRetries()) { - s_logger.error("Ping Interval has gone past " + _pingInterval * _shell.getPingRetries() + ". Attempting to reconnect."); - final Link link = task.getLink(); - reconnect(link); + s_logger.error("Ping Interval has gone past " + _pingInterval * _shell.getPingRetries() + ". Won't reconnect to mgt server, as connection is still alive"); return; }