Skip to content

Commit cd414a0

Browse files
committed
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
1 parent 7e43038 commit cd414a0

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

‎engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,6 @@ protected boolean filter(ExcludeList avoid, StoragePool pool, DiskProfile dskCh,
183183
Volume volume = _volumeDao.findById(dskCh.getVolumeId());
184184
List<Volume> requestVolumes = new ArrayList<Volume>();
185185
requestVolumes.add(volume);
186-
return storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
186+
return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
187187
}
188188
}

‎engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator {
4747
@Inject
4848
DataStoreManager dataStoreMgr;
4949

50-
@Override
51-
protected boolean filter(ExcludeList avoid, StoragePool pool, DiskProfile dskCh, DeploymentPlan plan) {
52-
Volume volume = _volumeDao.findById(dskCh.getVolumeId());
53-
List<Volume> requestVolumes = new ArrayList<Volume>();
54-
requestVolumes.add(volume);
55-
56-
return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
57-
}
5850

5951
@Override
6052
protected List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {

0 commit comments

Comments
 (0)