Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C144DEEA9 for ; Fri, 18 Jan 2013 22:23:46 +0000 (UTC) Received: (qmail 77496 invoked by uid 500); 18 Jan 2013 22:23:44 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 77412 invoked by uid 500); 18 Jan 2013 22:23:44 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 77009 invoked by uid 99); 18 Jan 2013 22:23:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jan 2013 22:23:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8722D81F89D; Fri, 18 Jan 2013 22:23:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mlsorensen@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [42/50] [abbrv] git commit: CLOUDSTACK-803: HA gets triggered even when the host investigator is unable to determine the state of the host HA won't be triggered in case the host investigator is not able to determine the state Message-Id: <20130118222343.8722D81F89D@tyr.zones.apache.org> Date: Fri, 18 Jan 2013 22:23:43 +0000 (UTC) CLOUDSTACK-803: HA gets triggered even when the host investigator is unable to determine the state of the host HA won't be triggered in case the host investigator is not able to determine the state Signed-off-by: Koushik Das Signed-off-by: Abhinandan Prateek Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/e45a9f3a Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e45a9f3a Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e45a9f3a Branch: refs/heads/add_remove_nics Commit: e45a9f3aed3f3ad2295848f2475a4a1ec478ee81 Parents: 070856a Author: Koushik Das Authored: Mon Jan 7 11:06:54 2013 +0530 Committer: Abhinandan Prateek Committed: Fri Jan 18 17:20:51 2013 +0530 ---------------------------------------------------------------------- .../com/cloud/agent/manager/AgentManagerImpl.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e45a9f3a/server/src/com/cloud/agent/manager/AgentManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/agent/manager/AgentManagerImpl.java b/server/src/com/cloud/agent/manager/AgentManagerImpl.java index 8b3ee6b..fd5b3bd 100755 --- a/server/src/com/cloud/agent/manager/AgentManagerImpl.java +++ b/server/src/com/cloud/agent/manager/AgentManagerImpl.java @@ -918,10 +918,16 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager { s_logger.info("Investigating why host " + hostId + " has disconnected with event " + event); final Status determinedState = investigate(attache); + // if state cannot be determined do nothing and bail out + if (determinedState == null) { + s_logger.warn("Agent state cannot be determined, do nothing"); + return false; + } + final Status currentStatus = host.getStatus(); s_logger.info("The state determined is " + determinedState); - if (determinedState == null || determinedState == Status.Down) { + if (determinedState == Status.Down) { s_logger.error("Host is down: " + host.getId() + "-" + host.getName() + ". Starting HA on the VMs"); event = Status.Event.HostDown; } else if (determinedState == Status.Up) {