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

 ##########
 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]);
+        return hosts[_hostCounter++ % hosts.length];
+    }
+
+    public void setHost(final String host) {
 
 Review comment:
   maybe change to setHosts, setHostString or setHostsString? As it is a public 
method i do not insist if any problems can be foreseen.
   main message: String _host for the field is no longer a valid name.
 
----------------------------------------------------------------
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