cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-10132) Multiple Management Servers Support for agents
Date Mon, 13 Nov 2017 07:47:00 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-10132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16249200#comment-16249200
] 

ASF GitHub Bot commented on CLOUDSTACK-10132:
---------------------------------------------

rhtyd commented on a change in pull request #2309: CLOUDSTACK-10132: Multiple Management Servers
Support for agents
URL: https://github.com/apache/cloudstack/pull/2309#discussion_r150464671
 
 

 ##########
 File path: agent/src/com/cloud/agent/Agent.java
 ##########
 @@ -699,16 +719,97 @@ public void processResponse(final Response response, final Link link)
{
         }
     }
 
-    public void processReadyCommand(final Command cmd) {
+    /**
+     * Checks if received list is different to actual management server list (in order and
size)
+     * @param actual actual list
+     * @param received received list
+     * @return true if list is updated, false if not
+     */
+    private boolean isReceivedListUpdated(List<String> actual, List<String> received)
{
+        if (actual.size() != received.size()) {
+            return true;
+        }
+        for (int i = 0; i < received.size(); i++) {
+            if (!received.get(i).equals(actual.get(i))) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Persist newly received management servers list and reset host counter
+     * @param msList management servers list
+     */
+    private void persistNewManagementServersList(List<String> msList) {
+        final String newHosts = StringUtils.toCSVList(msList);
+        _shell.setHosts(newHosts);
+        _shell.setPersistentProperty(null, "host", newHosts);
+        _shell.resetHostCounter();
+        s_logger.info("Saved new management servers list: " + msList);
+    }
 
+    /**
+     * Try reconnecting to preferred management server after new list is received.
+     * If connection is not performed, host counter is reset
+     */
+    private void attemptReconnectionToPrimaryHost(String preferred) {
 
 Review comment:
   This can be removed, duplicates code too.

----------------------------------------------------------------
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:
users@infra.apache.org


> Multiple Management Servers Support for agents
> ----------------------------------------------
>
>                 Key: CLOUDSTACK-10132
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10132
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the default.) 
>    Affects Versions: 4.11.0.0
>            Reporter: Nicolas Vazquez
>            Assignee: Nicolas Vazquez
>
> Multiple Management Servers Support for agents



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message