cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject [47/53] [abbrv] git commit: updated refs/heads/resize-root to f52c743
Date Fri, 14 Mar 2014 05:34:39 GMT
HA manager to check target state of the VM to make decisions on whether or not to carry on
a cheduled step. Fix NPE in capacity manager when releasing capacity of a stopped VM.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4312d884
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4312d884
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4312d884

Branch: refs/heads/resize-root
Commit: 4312d884629d4a9e7716da4c869433cdaa8181b8
Parents: 3d5fbe7
Author: Kelven Yang <kelveny@gmail.com>
Authored: Tue Mar 4 16:43:26 2014 -0800
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Thu Mar 13 16:59:56 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/capacity/CapacityManagerImpl.java   | 5 +++++
 server/src/com/cloud/ha/HighAvailabilityManagerImpl.java | 2 ++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4312d884/server/src/com/cloud/capacity/CapacityManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/capacity/CapacityManagerImpl.java b/server/src/com/cloud/capacity/CapacityManagerImpl.java
index 957a5d0..69e8cfa 100755
--- a/server/src/com/cloud/capacity/CapacityManagerImpl.java
+++ b/server/src/com/cloud/capacity/CapacityManagerImpl.java
@@ -188,6 +188,11 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
         Long clusterId = null;
         if (hostId != null) {
             HostVO host = _hostDao.findById(hostId);
+            if (host == null) {
+                s_logger.warn("Host " + hostId + " no long exist anymore!");
+                return true;
+            }
+
             clusterId = host.getClusterId();
         }
         if (capacityCpu == null || capacityMemory == null || svo == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4312d884/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
index 3bcaf2e..8bd569a 100755
--- a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
+++ b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
@@ -701,6 +701,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements
HighAvai
                         (vm.getHostId() != null ? vm.getHostId() : "none") + " State: " +
vm.getState());
                     return null;
                 }
+
                 _itMgr.advanceStop(vm.getUuid(), false);
                 s_logger.info("Stop for " + vm + " was successful");
                 return null;
@@ -711,6 +712,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements
HighAvai
                         (vm.getHostId() != null ? vm.getHostId() : "none") + " State: " +
vm.getState());
                     return null;
                 }
+
                 _itMgr.advanceStop(vm.getUuid(), true);
                 s_logger.info("Stop for " + vm + " was successful");
                 return null;


Mime
View raw message