This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.11
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.11 by this push:
     new 6f1c555  agent: Fixes #2858 agent LB not working (#2859)
6f1c555 is described below

commit 6f1c5551fc577e35b606051be1325c59b05ae52b
Author: Rohit Yadav <ro...@apache.org>
AuthorDate: Sat Sep 22 14:40:18 2018 +0530

    agent: Fixes #2858 agent LB not working (#2859)
    
    This fixes the issue that on reconnection, agent LB feature will fail
    and only the first ms-host will be tried reconnection again and again.
    
    Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>
---
 agent/src/com/cloud/agent/Agent.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/agent/src/com/cloud/agent/Agent.java 
b/agent/src/com/cloud/agent/Agent.java
index 67115e6..1b3526d 100644
--- a/agent/src/com/cloud/agent/Agent.java
+++ b/agent/src/com/cloud/agent/Agent.java
@@ -509,8 +509,8 @@ public class Agent implements HandlerFactory, IAgentControl 
{
             _shell.getBackoffAlgorithm().waitBeforeRetry();
         }
 
-        final String host = _shell.getNextHost();
         do {
+            final String host = _shell.getNextHost();
             _connection = new NioClient("Agent", host, _shell.getPort(), 
_shell.getWorkers(), this);
             s_logger.info("Reconnecting to host:" + host);
             try {

Reply via email to