You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2013/07/09 08:29:12 UTC
git commit: updated refs/heads/master-6-17-stable to a54d234
Updated Branches:
refs/heads/master-6-17-stable 2c1a3b5f5 -> a54d2347f
CLOUDSTACK-3089 [ZWPS] NPE while cancelling the Storage Maintenance
Signed-off-by: Sateesh Chodapuneedi <sa...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a54d2347
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a54d2347
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a54d2347
Branch: refs/heads/master-6-17-stable
Commit: a54d2347fe8c798f4e3f658f683c548583d44485
Parents: 2c1a3b5
Author: Rajesh Battala <ra...@citrix.com>
Authored: Fri Jun 28 14:31:33 2013 +0530
Committer: Sateesh Chodapuneedi <sa...@apache.org>
Committed: Tue Jul 9 11:38:12 2013 +0530
----------------------------------------------------------------------
.../src/com/cloud/storage/StoragePoolAutomationImpl.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a54d2347/server/src/com/cloud/storage/StoragePoolAutomationImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StoragePoolAutomationImpl.java b/server/src/com/cloud/storage/StoragePoolAutomationImpl.java
index b656f30..9b02448 100644
--- a/server/src/com/cloud/storage/StoragePoolAutomationImpl.java
+++ b/server/src/com/cloud/storage/StoragePoolAutomationImpl.java
@@ -363,8 +363,16 @@ public class StoragePoolAutomationImpl implements StoragePoolAutomation {
.findById(store.getId());
StoragePool pool = (StoragePool)store;
- List<HostVO> hosts = _resourceMgr.listHostsInClusterByStatus(
+ //Handeling the Zone wide and cluster wide primay storage
+ List<HostVO> hosts = new ArrayList<HostVO>();
+ // if the storage scope is ZONE wide, then get all the hosts for which hypervisor ZWSP created to send Modifystoragepoolcommand
+ if (poolVO.getScope().equals(ScopeType.ZONE)) {
+ hosts = _resourceMgr.listAllUpAndEnabledHostsInOneZoneByHypervisor(poolVO.getHypervisor(), pool.getDataCenterId());
+ } else {
+ hosts = _resourceMgr.listHostsInClusterByStatus(
pool.getClusterId(), Status.Up);
+ }
+
if (hosts == null || hosts.size() == 0) {
return true;
}