Skip to content

Commit 4ed61c9

Browse files
weizhouapachedhslove
authored andcommitted
kvm: find cluster-wide pools only in Up state when investigate a host (apache#10516)
1 parent e55c3db commit 4ed61c9

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
@@ -38,6 +38,7 @@
3838
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
3939

4040
import javax.inject.Inject;
41+
import java.util.Arrays;
4142
import java.util.List;
4243

4344
public class KVMInvestigator extends AdapterBase implements Investigator {
@@ -81,7 +82,7 @@ public Status isAgentAlive(Host agent) {
8182
return haManager.getHostStatus(agent);
8283
}
8384

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

0 commit comments

Comments
 (0)