DaanHoogland commented on a change in pull request #2239: CLOUDSTACK-9993:
Securing Agents Communications
URL: https://github.com/apache/cloudstack/pull/2239#discussion_r134406335
##########
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:
this log message might be a bit deceiving. I think the ++ from the return
statement should be moved here or just above. Also the text is deceiving; the
connection is not actually made in this method. On the other hand the method
name might have to change to getNextHost()...
----------------------------------------------------------------
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