diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index c603c4d70eb..c7b3c3502eb 100644 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -583,8 +583,12 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C store = dataStoreMgr.getDataStore(pool.getId(), DataStoreRole.Primary); } - HostScope scope = new HostScope(host.getId(), host.getClusterId(), host.getDataCenterId()); - lifeCycle.attachHost(store, scope, pInfo); + pool = _storagePoolDao.findById(store.getId()); + if (pool.getStatus() != StoragePoolStatus.Maintenance && pool.getStatus() != StoragePoolStatus.Removed) { + HostScope scope = new HostScope(host.getId(), host.getClusterId(), host.getDataCenterId()); + lifeCycle.attachHost(store, scope, pInfo); + } + } catch (Exception e) { s_logger.warn("Unable to setup the local storage pool for " + host, e); throw new ConnectionException(true, "Unable to setup the local storage pool for " + host, e);