CS-15546, better log message

This commit is contained in:
Anthony Xu 2012-09-12 10:01:36 -07:00
parent eb2ff4bfcc
commit 786ff0bfd1
2 changed files with 2 additions and 2 deletions

View File

@ -1140,7 +1140,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
}
} else if (e instanceof HypervisorVersionChangedException) {
handleDisconnect(attache, Event.HypervisorVersionChanged, true);
throw new CloudRuntimeException("Unable to connect " + attache.getId(), e);
throw new CloudRuntimeException("Hypervisor Version Changed, disconnect host " + attache.getId() + " will reconnect later", 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);
handleDisconnect(attache, Event.AgentDisconnected, true);

View File

@ -559,10 +559,10 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
throw new RuntimeException(msg);
}
if (! resource.equals(host.getResource()) ) {
String msg = "host " + host.getPrivateIpAddress() + " changed from " + host.getResource() + " to " + resource;
host.setResource(resource);
host.setSetup(false);
_hostDao.update(agentId, host);
String msg = "host " + host.getPrivateIpAddress() + " changed from " + host.getResource() + " to " + resource;
s_logger.debug(msg);
throw new HypervisorVersionChangedException(msg);
}