cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/master to b40d9c2
Date Wed, 17 Dec 2014 22:35:00 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 5a10a4725 -> b40d9c23f


if local storage is in maitenance mode or removed, won't change its
status in case of mgt server restart
Reviewed-by:Frank


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b40d9c23
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b40d9c23
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b40d9c23

Branch: refs/heads/master
Commit: b40d9c23fcbb5e4dbce26557910c855aa80bd078
Parents: 5a10a47
Author: Edison Su <sudison@gmail.com>
Authored: Mon Dec 8 15:25:06 2014 -0800
Committer: Edison Su <sudison@gmail.com>
Committed: Wed Dec 17 14:34:23 2014 -0800

----------------------------------------------------------------------
 server/src/com/cloud/storage/StorageManagerImpl.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b40d9c23/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index c603c4d7..c7b3c35 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);


Mime
View raw message