kvm: find cluster-wide pools only in Up state when investigate a host (#10516)

This commit is contained in:
Wei Zhou 2025-03-10 14:27:38 +01:00 committed by GitHub
parent cd6d1a23a2
commit 8ce34ad791
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
import org.apache.log4j.Logger;
import javax.inject.Inject;
import java.util.Arrays;
import java.util.List;
public class KVMInvestigator extends AdapterBase implements Investigator {
@ -83,7 +84,7 @@ public class KVMInvestigator extends AdapterBase implements Investigator {
return haManager.getHostStatus(agent);
}
List<StoragePoolVO> clusterPools = _storagePoolDao.listPoolsByCluster(agent.getClusterId());
List<StoragePoolVO> clusterPools = _storagePoolDao.findPoolsInClusters(Arrays.asList(agent.getClusterId()), null);
boolean storageSupportHA = storageSupportHa(clusterPools);
if (!storageSupportHA) {
List<StoragePoolVO> zonePools = _storagePoolDao.findZoneWideStoragePoolsByHypervisor(agent.getDataCenterId(), agent.getHypervisorType());