cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [cloudstack] branch 4.11 updated: agent: on shutdown don't allow server reconnection (#2904)
Date Wed, 17 Oct 2018 01:01:22 GMT
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.11
in repository

The following commit(s) were added to refs/heads/4.11 by this push:
     new 1904a70  agent: on shutdown don't allow server reconnection (#2904)
1904a70 is described below

commit 1904a70512b8383a5fd69efd1723644f1ed46aac
Author: Rohit Yadav <>
AuthorDate: Wed Oct 17 06:31:13 2018 +0530

    agent: on shutdown don't allow server reconnection (#2904)
    When agent is stopped, don't allow reconnection. Previously this would
    send a shutdown command to the management server which would put the
    host state to Disconnected but then agent's reconnection logic may kick
    in sometimes which would connect the agent to the management server
    but then the agent process would terminate causing the host to be
    put in Alert state (due to ping timeout or it waiting too long).
    This fixes the issue by ensuring that when the agent is stopped, it
    does not reconnect to the management server.
    Signed-off-by: Rohit Yadav <>
 agent/src/com/cloud/agent/ | 1 +
 1 file changed, 1 insertion(+)

diff --git a/agent/src/com/cloud/agent/ b/agent/src/com/cloud/agent/
index 1b3526d..f1f2116 100644
--- a/agent/src/com/cloud/agent/
+++ b/agent/src/com/cloud/agent/
@@ -303,6 +303,7 @@ public class Agent implements HandlerFactory, IAgentControl {
     public void stop(final String reason, final String detail) {"Stopping the agent: Reason = " + reason + (detail != null ? ": Detail
= " + detail : ""));
+        _reconnectAllowed = false;
         if (_connection != null) {
             final ShutdownCommand cmd = new ShutdownCommand(reason, detail);
             try {

View raw message