Skip to content

Commit 8ce34ad

Browse files
kvm: find cluster-wide pools only in Up state when investigate a host (#10516)
1 parent cd6d1a2 commit 8ce34ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/ha/KVMInvestigator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.apache.log4j.Logger;
4040

4141
import javax.inject.Inject;
42+
import java.util.Arrays;
4243
import java.util.List;
4344

4445
public class KVMInvestigator extends AdapterBase implements Investigator {
@@ -83,7 +84,7 @@ public Status isAgentAlive(Host agent) {
8384
return haManager.getHostStatus(agent);
8485
}
8586

86-
List<StoragePoolVO> clusterPools = _storagePoolDao.listPoolsByCluster(agent.getClusterId());
87+
List<StoragePoolVO> clusterPools = _storagePoolDao.findPoolsInClusters(Arrays.asList(agent.getClusterId()), null);
8788
boolean storageSupportHA = storageSupportHa(clusterPools);
8889
if (!storageSupportHA) {
8990
List<StoragePoolVO> zonePools = _storagePoolDao.findZoneWideStoragePoolsByHypervisor(agent.getDataCenterId(), agent.getHypervisorType());

0 commit comments

Comments
 (0)