Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward 7e4303821 -> cd414a0f5


CLOUDSTACK-6935 refactor StoragePoolAllocator#filter logic

to support IOPS capacity control in a cluster wide storage pool and a
local storage pool
to enable hypervisor type check, storage type check for root volume and
avoid list check


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

Branch: refs/heads/4.4-forward
Commit: cd414a0f56798ae801fc464be127e37daabef809
Parents: 7e43038
Author: ynojima <m...@ynojima.net>
Authored: Wed Jun 18 00:01:47 2014 -0600
Committer: ynojima <m...@ynojima.net>
Committed: Wed Jun 18 11:56:21 2014 -0600

----------------------------------------------------------------------
 .../storage/allocator/AbstractStoragePoolAllocator.java      | 2 +-
 .../storage/allocator/ZoneWideStoragePoolAllocator.java      | 8 --------
 2 files changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd414a0f/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 ddbb5a4..2d958a6 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.storagePoolHasEnoughSpace(requestVolumes, pool);
+        return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && 
storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd414a0f/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 8fb9c8d..c629906 100644
--- 
a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
+++ 
b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
@@ -47,14 +47,6 @@ 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) {

Reply via email to