Skip to content

Commit a61f775

Browse files
committed
Revert "CLOUDSTACK-6935 refactor StoragePoolAllocator#filter logic"
This reverts commit cd414a0.
1 parent cd414a0 commit a61f775

2 files changed

Lines changed: 9 additions & 1 deletion

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.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
186+
return storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
187187
}
188188
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ 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+
}
5058

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

0 commit comments

Comments
 (0)