diff --git a/server/src/com/cloud/agent/manager/AgentManagerImpl.java b/server/src/com/cloud/agent/manager/AgentManagerImpl.java index be5b866b639..373c220b301 100755 --- a/server/src/com/cloud/agent/manager/AgentManagerImpl.java +++ b/server/src/com/cloud/agent/manager/AgentManagerImpl.java @@ -644,7 +644,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory { if (host.getType() == Type.Routing && host.getHypervisorType() == HypervisorType.XenServer ) { if (host.getClusterId() != null) { List hosts = _hostDao.listBy(Type.Routing, host.getClusterId(), host.getPodId(), host.getDataCenterId()); - boolean success = false; + boolean success = true; for( HostVO thost: hosts ) { long thostId = thost.getId(); if( thostId == hostId ) continue; @@ -656,7 +656,8 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory { success = true; break; } else { - s_logger.debug("Eject Host: " + hostId + " from " + thostId + " failed due to " + answer.getDetails()); + success = false; + s_logger.debug("Eject Host: " + hostId + " from " + thostId + " failed due to " + (answer != null ? answer.getDetails() : "no answer")); } } if( !success ){