Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B82A0200D4A for ; Tue, 14 Nov 2017 02:03:23 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4AE47160C06; Tue, 14 Nov 2017 01:03:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B7A26160BF3 for ; Tue, 14 Nov 2017 02:03:17 +0100 (CET) Received: (qmail 36896 invoked by uid 500); 14 Nov 2017 01:03:11 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 36887 invoked by uid 99); 14 Nov 2017 01:03:11 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2017 01:03:11 +0000 From: GitBox To: commits@cloudstack.apache.org Subject: [GitHub] nvazquez commented on a change in pull request #2309: CLOUDSTACK-10132: Multiple Management Servers Support for agents Message-ID: <151062139102.20620.2197907337909370740.gitbox@gitbox.apache.org> archived-at: Tue, 14 Nov 2017 01:03:23 -0000 nvazquez 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_r150711950 ########## File path: agent/src/com/cloud/agent/Agent.java ########## @@ -990,4 +1091,53 @@ public void doTask(final Task task) throws TaskExecutionException { } } } + + public class HostLBCheckerTask extends ManagedContextTimerTask { + + @Override + protected void runInContext() { + try { + int index = 0; + final String[] msList = _shell.getHosts(); + String preferredHost = msList[index]; + final String connectedHost = _shell.getConnectedHost(); + if (s_logger.isTraceEnabled()) { + s_logger.trace("Running host LB checker task, connected host=" + connectedHost + ", preferred host=" + preferredHost); + } + final long wait = _shell.getFailbackPollingWait(); + while (!preferredHost.equals(connectedHost)) { Review comment: Done, thanks ---------------------------------------------------------------- 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 With regards, Apache Git Services