From a93d36d81ad012abdfe7aa6c1609e836417bfe19 Mon Sep 17 00:00:00 2001 From: anthony Date: Fri, 8 Oct 2010 18:05:40 -0700 Subject: [PATCH] should use _hostDao.listByCluster instead of _hostDao.listByPodId in some places --- server/src/com/cloud/ha/XenServerInvestigator.java | 2 +- server/src/com/cloud/storage/StorageManagerImpl.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/ha/XenServerInvestigator.java b/server/src/com/cloud/ha/XenServerInvestigator.java index d559ab483a6..fa82cfd498d 100644 --- a/server/src/com/cloud/ha/XenServerInvestigator.java +++ b/server/src/com/cloud/ha/XenServerInvestigator.java @@ -52,7 +52,7 @@ public class XenServerInvestigator extends AdapterBase implements Investigator { } CheckOnHostCommand cmd = new CheckOnHostCommand(agent); - List neighbors = _hostDao.listByHostPod(agent.getPodId()); + List neighbors = _hostDao.listByCluster(agent.getClusterId()); for (HostVO neighbor : neighbors) { if (neighbor.getId() == agent.getId() || neighbor.getHypervisorType() != HypervisorType.XenServer) { continue; diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index b5e0bf46f07..4ed91e9e416 100755 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -1254,7 +1254,9 @@ public class StorageManagerImpl implements StorageManager { } List hosts = null; - if (podId != null) { + if (clusterId != null) { + hosts = _hostDao.listByCluster(clusterId); + } else if (podId != null) { hosts = _hostDao.listByHostPod(podId); } else { hosts = _hostDao.listByDataCenter(zoneId);