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.
This commit is contained in:
prachi 2011-04-14 13:23:44 -07:00
parent 92155522f2
commit 0fa06646ba
1 changed files with 2 additions and 7 deletions

View File

@ -353,10 +353,8 @@ public class CapacityManagerImpl implements CapacityManager , StateListener<Stat
} catch (InterruptedException e1) {
}
// get all hosts..
SearchCriteria<HostVO> sc = _hostDao.createSearchCriteria();
sc.addAnd("status", SearchCriteria.Op.EQ, Status.Up.toString());
List<HostVO> hosts = _hostDao.search(sc, null);
// get all hosts...even if they are not in 'UP' state
List<HostVO> hosts = _hostDao.listByType(Host.Type.Routing);
// prep the service offerings
List<ServiceOfferingVO> offerings = _offeringsDao.listAllIncludingRemoved();
@ -366,9 +364,6 @@ public class CapacityManagerImpl implements CapacityManager , StateListener<Stat
}
for (HostVO host : hosts) {
if (host.getType() != Host.Type.Routing) {
continue;
}
long usedCpu = 0;
long usedMemory = 0;