Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CE237D7F9 for ; Fri, 5 Oct 2012 22:32:55 +0000 (UTC) Received: (qmail 45314 invoked by uid 500); 5 Oct 2012 22:32:47 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 45244 invoked by uid 500); 5 Oct 2012 22:32:47 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 44413 invoked by uid 99); 5 Oct 2012 22:32:46 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 22:32:46 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0706D3AAEC; Fri, 5 Oct 2012 22:32:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hugo@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [35/49] git commit: CLOUDSTACK-251 : Message-Id: <20121005223246.0706D3AAEC@tyr.zones.apache.org> Date: Fri, 5 Oct 2012 22:32:46 +0000 (UTC) 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/8be7df6e Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/8be7df6e Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/8be7df6e Branch: refs/heads/maven-to-rpm Commit: 8be7df6ee6e12e8ba16ab1a5b17e7967cf8419fe Parents: a6a3cb5 Author: Anthony Xu Authored: Thu Oct 4 11:24:30 2012 -0700 Committer: Hugo Trippaers Committed: Sat Oct 6 00:30:26 2012 +0200 ---------------------------------------------------------------------- .../cloud/storage/listener/StoragePoolMonitor.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8be7df6e/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 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); } } }