From 1db4e8b3f580cf656ec0499d843b0188b2534a86 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Nov 2011 20:07:49 +0530 Subject: [PATCH] bug 11938: Remove thread.sleep() from HostCapacityChecker. cpu and memory capacities can be null for host in maintenance so check for that, wrap the host capacity checker thread with try and catch to make it more robust. Add more logging for entry and exit of thread. status 11938: resolved fixed reviewed-by: Abhi --- .../cloud/capacity/CapacityManagerImpl.java | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/server/src/com/cloud/capacity/CapacityManagerImpl.java b/server/src/com/cloud/capacity/CapacityManagerImpl.java index e7043b7dc87..bf805258b76 100755 --- a/server/src/com/cloud/capacity/CapacityManagerImpl.java +++ b/server/src/com/cloud/capacity/CapacityManagerImpl.java @@ -108,8 +108,8 @@ public class CapacityManagerImpl implements CapacityManager, StateListener hosts = _hostDao.listByType(Host.Type.Routing); // prep the service offerings @@ -455,6 +452,11 @@ public class CapacityManagerImpl implements CapacityManager, StateListener