incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
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
Date Fri, 18 Jan 2013 22:23:43 GMT
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 <koushik.das@citrix.com>
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>


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 <koushik.das@citrix.com>
Authored: Mon Jan 7 11:06:54 2013 +0530
Committer: Abhinandan Prateek <aprateek@apache.org>
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) {


Mime
View raw message