sureshanaparti commented on a change in pull request #4640:
URL: https://github.com/apache/cloudstack/pull/4640#discussion_r582812933
##########
File path:
engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
##########
@@ -179,9 +179,32 @@ public boolean configure(String name, Map<String, Object>
params) throws Configu
} else if(allocationAlgorithm.equals("firstfitleastconsumed")){
pools = reorderPoolsByCapacity(plan, pools);
}
+
+ // Hardware accelerated pools are preferred for thick disks
+ if (dskCh != null &&
!dskCh.getProvisioningType().equals(Storage.ProvisioningType.THIN) &&
+
!storageMgr.DiskProvisioningStrictness.valueIn(plan.getDataCenterId())) {
+ pools = reorderPoolsByDiskProvisioningType(pools, dskCh);
+ }
+
return pools;
}
+ private List<StoragePool>
reorderPoolsByDiskProvisioningType(List<StoragePool> pools, DiskProfile dskCh) {
+ List<StoragePool> reorderedPools = new ArrayList<>();
+ for (StoragePool pool: pools) {
Review comment:
re-ordering is strictly for thick disk provision type here, i think it
should be based on the provisioning type in the disk profile?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]