if local storage is in maitenance mode or removed, won't change its

status in case of mgt server restart
Reviewed-by:Frank
This commit is contained in:
Edison Su 2014-12-08 15:25:06 -08:00
parent 50d5d488d4
commit 8f2bd45660

View File

@ -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);