cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [09/50] [abbrv] git commit: updated refs/heads/disk-cache to 6f3e4d3
Date Wed, 20 Nov 2013 14:50:39 GMT
    XS host free memory might change, if user manually changes dom0 memory,
    this patch makes CS update latest XS host free memory on host connect process.


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

Branch: refs/heads/disk-cache
Commit: ac649b43e6863ffaef6d74e02a3ab450223cb170
Parents: 9c739ef
Author: Anthony Xu <anthony.xu@citrix.com>
Authored: Thu Nov 14 12:07:29 2013 -0800
Committer: Anthony Xu <anthony.xu@citrix.com>
Committed: Thu Nov 14 12:07:29 2013 -0800

----------------------------------------------------------------------
 server/src/com/cloud/capacity/CapacityManagerImpl.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac649b43/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 19cf70e..7245f14 100755
--- a/server/src/com/cloud/capacity/CapacityManagerImpl.java
+++ b/server/src/com/cloud/capacity/CapacityManagerImpl.java
@@ -589,9 +589,10 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
 
         CapacityVO cpuCap = _capacityDao.findByHostIdType(host.getId(), CapacityVO.CAPACITY_TYPE_CPU);
         CapacityVO memCap = _capacityDao.findByHostIdType(host.getId(), CapacityVO.CAPACITY_TYPE_MEMORY);
-        memCap.setTotalCapacity(host.getTotalMemory());
         if (cpuCap != null && memCap != null){
-
+            if ( host.getTotalMemory() != null ) {
+                memCap.setTotalCapacity(host.getTotalMemory());
+            }      
             long hostTotalCpu = host.getCpus().longValue() * host.getSpeed().longValue();
 
             if (cpuCap.getTotalCapacity() != hostTotalCpu) {


Mime
View raw message