cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject git commit: updated refs/heads/master to ac438a6
Date Fri, 05 Jul 2013 07:50:10 GMT
Updated Branches:
  refs/heads/master d1adefe28 -> ac438a6d1


CLOUDSTACK-3372: CapacityManager does not count destroyed volumes when deploy VMs


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

Branch: refs/heads/master
Commit: ac438a6d1dc21e58a6a376287147b7bcec4b327c
Parents: d1adefe
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Fri Jul 5 09:49:56 2013 +0200
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Fri Jul 5 09:49:56 2013 +0200

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac438a6d/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 108de3b..101902c 100755
--- a/server/src/com/cloud/capacity/CapacityManagerImpl.java
+++ b/server/src/com/cloud/capacity/CapacityManagerImpl.java
@@ -501,8 +501,8 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
     @Override
     public long getAllocatedPoolCapacity(StoragePoolVO pool, VMTemplateVO templateForVmCreation){
 
-        // Get size for all the volumes
-        Pair<Long, Long> sizes = _volumeDao.getCountAndTotalByPool(pool.getId());
+        // Get size for all the non-destroyed volumes
+        Pair<Long, Long> sizes = _volumeDao.getNonDestroyedCountAndTotalByPool(pool.getId());
         long totalAllocatedSize = sizes.second() + sizes.first() * _extraBytesPerVolume;
 
         // Get size for VM Snapshots


Mime
View raw message