From 65bc9f95a8573f1c68223ebd15823946a8b096cd 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 c0ad109c6e2..7b9e22df995 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() != Hypervisor.Type.XenServer) { continue; diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index 9632e72b606..257ef4be10f 100644 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -1144,7 +1144,9 @@ public class StorageManagerImpl implements StorageManager { Hypervisor.Type hypervisorType = null; 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);