cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/4.4 to 80f2694
Date Fri, 27 Jun 2014 15:46:21 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 a1a23d2f0 -> 80f269444


Revert "CLOUDSTACK-6935 refactor StoragePoolAllocator#filter logic"

This reverts commit 99dd86e588fd28dedd5fb3b830297a8a4f885760.


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

Branch: refs/heads/4.4
Commit: 80f2694443e2795f289c95b10776285cc449f779
Parents: a1a23d2
Author: Daan Hoogland <daan@onecht.net>
Authored: Fri Jun 27 17:45:35 2014 +0200
Committer: Daan Hoogland <daan@onecht.net>
Committed: Fri Jun 27 17:45:35 2014 +0200

----------------------------------------------------------------------
 .../storage/allocator/AbstractStoragePoolAllocator.java     | 2 +-
 .../storage/allocator/ZoneWideStoragePoolAllocator.java     | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/80f26944/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
index 847bad3..894b4d4 100755
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
@@ -191,6 +191,6 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase
implement
         Volume volume = _volumeDao.findById(dskCh.getVolumeId());
         List<Volume> requestVolumes = new ArrayList<Volume>();
         requestVolumes.add(volume);
-        return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes,
pool);
+        return storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/80f26944/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
index f9abfde..8fb9c8d 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
@@ -34,6 +34,7 @@ import com.cloud.deploy.DeploymentPlan;
 import com.cloud.deploy.DeploymentPlanner.ExcludeList;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.storage.StoragePool;
+import com.cloud.storage.Volume;
 import com.cloud.user.Account;
 import com.cloud.vm.DiskProfile;
 import com.cloud.vm.VirtualMachineProfile;
@@ -46,6 +47,14 @@ public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator
{
     @Inject
     DataStoreManager dataStoreMgr;
 
+    @Override
+    protected boolean filter(ExcludeList avoid, StoragePool pool, DiskProfile dskCh, DeploymentPlan
plan) {
+        Volume volume = _volumeDao.findById(dskCh.getVolumeId());
+        List<Volume> requestVolumes = new ArrayList<Volume>();
+        requestVolumes.add(volume);
+
+        return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes,
pool);
+    }
 
     @Override
     protected List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile vmProfile,
DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {


Mime
View raw message