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


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2e450207
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2e450207
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2e450207

Branch: refs/heads/master
Commit: 2e45020700685dc09f4339eaf137792dc2379e04
Parents: 1a98992
Author: Edison Su <[email protected]>
Authored: Thu Oct 16 16:59:09 2014 -0700
Committer: Edison Su <[email protected]>
Committed: Tue Oct 21 10:32:40 2014 -0700

----------------------------------------------------------------------
 agent/src/com/cloud/agent/Agent.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e450207/agent/src/com/cloud/agent/Agent.java
----------------------------------------------------------------------
diff --git a/agent/src/com/cloud/agent/Agent.java 
b/agent/src/com/cloud/agent/Agent.java
index d08f346..ac2d9ba 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;
             }
 

Reply via email to