rhtyd commented on a change in pull request #2239: CLOUDSTACK-9993: Securing 
Agents Communications
URL: https://github.com/apache/cloudstack/pull/2239#discussion_r134769071
 
 

 ##########
 File path: agent/src/com/cloud/agent/AgentShell.java
 ##########
 @@ -107,7 +108,16 @@ public String getPod() {
 
     @Override
     public String getHost() {
-        return _host;
+        String[] hosts = _host.split(",");
+        if (_hostCounter >= hosts.length) {
+            _hostCounter = 0;
+        }
+        s_logger.info("Connecting to host: " + hosts[_hostCounter % 
hosts.length]);
 
 Review comment:
   I'll refactor this, however this prints the next 'host' the `Agent` class 
may attempt to connect to.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to