bug 6665: don't need to send poolEject command for the last host, and mark it as success

status 6665: resolved fixed
This commit is contained in:
anthony 2010-10-21 10:17:17 -07:00
parent 9d6e553288
commit 118066eeab
1 changed files with 2 additions and 2 deletions

View File

@ -531,7 +531,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory {
if (host.getType() == Type.Routing && host.getHypervisorType() == Hypervisor.Type.XenServer ) {
if (host.getClusterId() != null) {
List<HostVO> 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;
@ -544,9 +544,9 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory {
break;
} else {
success = false;
s_logger.debug("Eject Host: " + hostId + " from " + thostId + " failed due to " + (answer != null ? answer.getDetails() : "no answer"));
}
}
if( !success ){
throw new CloudRuntimeException("Unable to delete host " + hostId + " due to unable to eject it from pool");