From cb8f55a6f6dd70399025f64a491ab3c60a506b54 Mon Sep 17 00:00:00 2001 From: anthony Date: Tue, 31 Jan 2012 15:33:39 -0800 Subject: [PATCH] bug 12844, 13394: 1. if connect to host fails, don't need to investigate 2. add ha parameter to dissconnect host to indicate if HA VMs on this host status 12844, 13394: resolved fixed reviewed-by : edison Conflicts: server/src/com/cloud/agent/manager/AgentManagerImpl.java server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java --- .../src/com/cloud/agent/manager/AgentManagerImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/server/src/com/cloud/agent/manager/AgentManagerImpl.java b/server/src/com/cloud/agent/manager/AgentManagerImpl.java index c9198f87704..431bf0c2deb 100755 --- a/server/src/com/cloud/agent/manager/AgentManagerImpl.java +++ b/server/src/com/cloud/agent/manager/AgentManagerImpl.java @@ -608,19 +608,19 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager { ConnectionException ce = (ConnectionException)e; if (ce.isSetupError()) { s_logger.warn("Monitor " + monitor.second().getClass().getSimpleName() + " says there is an error in the connect process for " + hostId + " due to " + e.getMessage()); - handleDisconnectWithInvestigation(attache, Event.AgentDisconnected); + handleDisconnectWithoutInvestigation(attache, Event.AgentDisconnected); throw ce; } else { s_logger.info("Monitor " + monitor.second().getClass().getSimpleName() + " says not to continue the connect process for " + hostId + " due to " + e.getMessage()); - handleDisconnectWithInvestigation(attache, Event.ShutdownRequested); + handleDisconnectWithoutInvestigation(attache, Event.ShutdownRequested); return attache; } } else if (e instanceof HypervisorVersionChangedException) { - handleDisconnectWithInvestigation(attache, Event.ShutdownRequested); + handleDisconnectWithoutInvestigation(attache, Event.ShutdownRequested); throw new CloudRuntimeException("Unable to connect " + attache.getId(), e); } else { s_logger.error("Monitor " + monitor.second().getClass().getSimpleName() + " says there is an error in the connect process for " + hostId + " due to " + e.getMessage(), e); - handleDisconnectWithInvestigation(attache, Event.AgentDisconnected); + handleDisconnectWithoutInvestigation(attache, Event.AgentDisconnected); throw new CloudRuntimeException("Unable to connect " + attache.getId(), e); } } @@ -634,7 +634,8 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager { // this is tricky part for secondary storage // make it as disconnected, wait for secondary storage VM to be up // return the attache instead of null, even it is disconnectede - handleDisconnectWithInvestigation(attache, Event.AgentDisconnected); + handleDisconnectWithoutInvestigation(attache, Event.AgentDisconnected); + throw new CloudRuntimeException("ReadyCommand failed for host " + attache.getId()); } agentStatusTransitTo(host, Event.Ready, _nodeId);