cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthon...@apache.org
Subject git commit: CLOUDSTACK-251 :
Date Thu, 04 Oct 2012 18:34:36 GMT
Updated Branches:
  refs/heads/master 3e7ba774f -> 15f6fbbee


CLOUDSTACK-251 :

when host is reconnected, CS try to make sure the host can access primary storage,
CS only do this when primary storage is UP, and even host cannot access primary storage,
that is okay, do not throw exception, just print a warning message


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

Branch: refs/heads/master
Commit: 15f6fbbee4ae0c58f8b5188c824e273cb5ca2640
Parents: 3e7ba77
Author: Anthony Xu <anthony@cloud.com>
Authored: Thu Oct 4 11:24:30 2012 -0700
Committer: Anthony Xu <anthony@cloud.com>
Committed: Thu Oct 4 11:31:53 2012 -0700

----------------------------------------------------------------------
 .../cloud/storage/listener/StoragePoolMonitor.java |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/15f6fbbe/server/src/com/cloud/storage/listener/StoragePoolMonitor.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/listener/StoragePoolMonitor.java b/server/src/com/cloud/storage/listener/StoragePoolMonitor.java
index 3bb002b..264b93e 100755
--- a/server/src/com/cloud/storage/listener/StoragePoolMonitor.java
+++ b/server/src/com/cloud/storage/listener/StoragePoolMonitor.java
@@ -34,6 +34,7 @@ import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.server.ManagementService;
 import com.cloud.storage.OCFS2Manager;
 import com.cloud.storage.StorageManagerImpl;
+import com.cloud.storage.StoragePoolStatus;
 import com.cloud.storage.StoragePoolVO;
 import com.cloud.storage.Storage.StoragePoolType;
 import com.cloud.storage.dao.StoragePoolDao;
@@ -78,6 +79,9 @@ public class StoragePoolMonitor implements Listener {
 				scCmd.getHypervisorType() == HypervisorType.VMware || scCmd.getHypervisorType() ==  HypervisorType.Simulator
|| scCmd.getHypervisorType() == HypervisorType.Ovm) {
     			List<StoragePoolVO> pools = _poolDao.listBy(host.getDataCenterId(), host.getPodId(),
host.getClusterId());
     			for (StoragePoolVO pool : pools) {
+    			    if (pool.getStatus() != StoragePoolStatus.Up) {
+    			        continue;
+    			    }
     			    if (!pool.getPoolType().isShared()) {
     			        continue;
     			    }
@@ -92,7 +96,7 @@ public class StoragePoolMonitor implements Listener {
     				    _storageManager.connectHostToSharedPool(hostId, pool);
     					_storageManager.createCapacityEntry(pool);
     				} catch (Exception e) {
-    				    throw new ConnectionException(true, "Unable to connect to pool " + pool, e);
+    				    s_logger.warn("Unable to connect host " + hostId + " to pool " + pool + " due
to " + e.toString(), e);
     				}
     			}
     		}


Mime
View raw message