From 0ea1f370b8336b78db27c1661395097eabfa7c9f Mon Sep 17 00:00:00 2001 From: abhishek Date: Tue, 7 Sep 2010 11:08:38 -0700 Subject: [PATCH] bug 5147: Adding the check to block create and destroy of system resources whilst the storage pool is in maintenance mode. This is based on checking if the pool is in UP state --- .../storage/allocator/AbstractStoragePoolAllocator.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/storage/allocator/AbstractStoragePoolAllocator.java b/server/src/com/cloud/storage/allocator/AbstractStoragePoolAllocator.java index e0ae7a9e756..d29e51d11cf 100644 --- a/server/src/com/cloud/storage/allocator/AbstractStoragePoolAllocator.java +++ b/server/src/com/cloud/storage/allocator/AbstractStoragePoolAllocator.java @@ -142,7 +142,12 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement return false; } - + //if pool is NOT in up state, return false + if(!pool.getStatus().equals(com.cloud.host.Status.Up))//this is the pool status + { + return false; + } + // Check that the pool type is correct if (!poolIsCorrectType(dskCh, pool, vm, offering)) { return false;