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
This commit is contained in:
anthony 2012-01-31 15:33:39 -08:00
parent af81ae4078
commit cb8f55a6f6
1 changed files with 6 additions and 5 deletions

View File

@ -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);