----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/6028/ -----------------------------------------------------------
(Updated July 26, 2012, 12:39 p.m.) Review request for cloudstack, Prachi Damle and Nitin Mehta. Changes ------- modification in StorageManagerImpl.java and StorageManager.java: add a new method storagePoolHasEnoughSpace(List<Volumes>, StoragePool), check if storagePool has enough space for all requested volumes modification in FirstfitPlanner.findPotentialDeploymentResources: handle multiple volume case, keep track of allocated volumes for pools and call storagePoolHasEnoughSpace to check space availability modification in AbstractStoragePoolAllocator.java: extract capacity computation logic and make a new method in StorageManagerImpl run simple tests same as previously ones Description (updated) ------- fix CS-15609 Volumes can be created as a part of VM creation when un-allocated space is insufficient on primary storage check the availability of un-allocated primary storage space during planning stage, for multiple-volume VM creation scenario modification in StorageManagerImpl.java and StorageManager.java: add a new method storagePoolHasEnoughSpace(List<Volumes>, StoragePool), check if storagePool has enough space for all requested volumes modification in FirstfitPlanner.findPotentialDeploymentResources: handle multiple volume case, keep track of allocated volumes for pools and call storagePoolHasEnoughSpace to check space availability modification in AbstractStoragePoolAllocator.java: extract capacity computation logic and make a new method in StorageManagerImpl This addresses bug CS-15609. Diffs (updated) ----- server/src/com/cloud/deploy/FirstFitPlanner.java eb82c75 server/src/com/cloud/storage/StorageManager.java 67ad97c server/src/com/cloud/storage/StorageManagerImpl.java d94bada server/src/com/cloud/storage/allocator/AbstractStoragePoolAllocator.java 0a0f66e Diff: https://reviews.apache.org/r/6028/diff/ Testing ------- perform following tests: (overprovisioning.factor=1) 1) create vm with 20G root + 20G data on one NFS PS, with allocation state 7.82GB/36.72GB, VM creation failed as expected 2) create vm with 20G root + 5G data on one NFS PS, with allocation state 7.82GB/36.72GB, threshold=0.85, VM creation failed as expected 3) create vm with 20G root + 5G data on one NFS PS, with allocation state 7.82GB/36.72GB, threshold=0.99, VM creation succeed as expected Thanks, mice xia