From 118066eeabb033f909ab83399e5bee4226c7149b Mon Sep 17 00:00:00 2001 From: anthony Date: Thu, 21 Oct 2010 10:17:17 -0700 Subject: [PATCH] bug 6665: don't need to send poolEject command for the last host, and mark it as success status 6665: resolved fixed --- server/src/com/cloud/agent/manager/AgentManagerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/agent/manager/AgentManagerImpl.java b/server/src/com/cloud/agent/manager/AgentManagerImpl.java index c85e1015ad9..bc207a5ae0b 100755 --- a/server/src/com/cloud/agent/manager/AgentManagerImpl.java +++ b/server/src/com/cloud/agent/manager/AgentManagerImpl.java @@ -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 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");