You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mt...@apache.org on 2014/06/27 07:57:00 UTC

git commit: updated refs/heads/master to 12e92e1

Repository: cloudstack
Updated Branches:
  refs/heads/master 9a27f201b -> 12e92e10f


Fixing an issue introduced with Review Request 22717

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

Branch: refs/heads/master
Commit: 12e92e10ffbd9f86ebff11c2a1b22c5bafafb3d1
Parents: 9a27f20
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Thu Jun 26 23:56:11 2014 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Thu Jun 26 23:56:11 2014 -0600

----------------------------------------------------------------------
 .../storage/allocator/ZoneWideStoragePoolAllocator.java  | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/12e92e10/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..8246a80 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;
@@ -101,6 +102,16 @@ public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator {
     }
 
     @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> reorderPoolsByNumberOfVolumes(DeploymentPlan plan, List<StoragePool> pools, Account account) {
         if (account == null) {
             return pools;