kvm: fix VM HA on zone-wide storage pools (#5164)

This commit is contained in:
Wei Zhou 2021-07-05 08:21:07 +02:00 committed by GitHub
parent d916e416ec
commit f286f01516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -85,6 +85,15 @@ public class KVMInvestigator extends AdapterBase implements Investigator {
break;
}
}
if (!hasNfs) {
List<StoragePoolVO> zonePools = _storagePoolDao.findZoneWideStoragePoolsByHypervisor(agent.getDataCenterId(), agent.getHypervisorType());
for (StoragePoolVO pool : zonePools) {
if (pool.getPoolType() == StoragePoolType.NetworkFilesystem) {
hasNfs = true;
break;
}
}
}
if (!hasNfs) {
s_logger.warn(
"Agent investigation was requested on host " + agent + ", but host does not support investigation because it has no NFS storage. Skipping investigation.");