cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject [1/2] git commit: updated refs/heads/4.2 to bccf5d8
Date Fri, 05 Jul 2013 08:48:12 GMT
Updated Branches:
  refs/heads/4.2 313177a51 -> bccf5d8ea


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/893eb377
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/893eb377
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/893eb377

Branch: refs/heads/4.2
Commit: 893eb37724b037ba7a8246f6e5de89e967c783c3
Parents: 313177a
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 10:47:58 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/893eb377/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 7a94c78..4214683 100755
--- a/server/src/com/cloud/capacity/CapacityManagerImpl.java
+++ b/server/src/com/cloud/capacity/CapacityManagerImpl.java
@@ -499,8 +499,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