Repository: cloudstack Updated Branches: refs/heads/master 6fcd4fbe7 -> 77e74841a
Revert "CLOUDSTACK-6935 refactor StoragePoolAllocator#filter logic" This reverts commit 31de58edab563eb1cb50c5c06437fdd3efc6a3d2. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/77e74841 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/77e74841 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/77e74841 Branch: refs/heads/master Commit: 77e74841a0b2b5217c5517d3f3241664a6100e5a Parents: 6fcd4fb Author: ynojima <m...@ynojima.net> Authored: Wed Jun 18 13:04:39 2014 -0600 Committer: ynojima <m...@ynojima.net> Committed: Wed Jun 18 13:04:39 2014 -0600 ---------------------------------------------------------------------- .../storage/allocator/AbstractStoragePoolAllocator.java | 2 +- .../storage/allocator/ZoneWideStoragePoolAllocator.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77e74841/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 2d958a6..ddbb5a4 100755 --- a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java @@ -183,6 +183,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/77e74841/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 c629906..8fb9c8d 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java @@ -47,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) {