diff --git a/server/src/com/cloud/storage/allocator/FirstFitStoragePoolAllocator.java b/server/src/com/cloud/storage/allocator/FirstFitStoragePoolAllocator.java index f5c1e5eb792..731bb2ec0b3 100644 --- a/server/src/com/cloud/storage/allocator/FirstFitStoragePoolAllocator.java +++ b/server/src/com/cloud/storage/allocator/FirstFitStoragePoolAllocator.java @@ -66,8 +66,6 @@ public class FirstFitStoragePoolAllocator extends AbstractStoragePoolAllocator { for (StoragePoolVO pool: pools) { if (checkPool(avoid, pool, dskCh, template, null, vm, sc)) { return pool; - } else { - pools.remove(pool); } } @@ -75,10 +73,6 @@ public class FirstFitStoragePoolAllocator extends AbstractStoragePoolAllocator { s_logger.debug("Unable to find any storage pool"); } - if (_dontMatter && pools.size() > 0) { - return pools.get(0); - } else { - return null; - } + return null; } }