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:21:32 -07:00
parent c362576837
commit 3260001b65
1 changed files with 3 additions and 2 deletions

View File

@ -644,7 +644,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory {
if (host.getType() == Type.Routing && host.getHypervisorType() == HypervisorType.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;
@ -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 ){