From 0fa06646ba258bb5bfe4c935689894dd8e5492df Mon Sep 17 00:00:00 2001 From: prachi Date: Thu, 14 Apr 2011 13:23:44 -0700 Subject: [PATCH] Bug 9310 - HostCapacityChecker thread does not cleanup reserved capacity for hosts that are not in 'Up' state List all 'Routing' hosts irrespective of the State. --- server/src/com/cloud/capacity/CapacityManagerImpl.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/server/src/com/cloud/capacity/CapacityManagerImpl.java b/server/src/com/cloud/capacity/CapacityManagerImpl.java index 11d6536e522..3fde1ab6848 100644 --- a/server/src/com/cloud/capacity/CapacityManagerImpl.java +++ b/server/src/com/cloud/capacity/CapacityManagerImpl.java @@ -353,10 +353,8 @@ public class CapacityManagerImpl implements CapacityManager , StateListener sc = _hostDao.createSearchCriteria(); - sc.addAnd("status", SearchCriteria.Op.EQ, Status.Up.toString()); - List hosts = _hostDao.search(sc, null); + // get all hosts...even if they are not in 'UP' state + List hosts = _hostDao.listByType(Host.Type.Routing); // prep the service offerings List offerings = _offeringsDao.listAllIncludingRemoved(); @@ -366,9 +364,6 @@ public class CapacityManagerImpl implements CapacityManager , StateListener