From f286f0151697ed6b05b65b8c95a89be525d38073 Mon Sep 17 00:00:00 2001 From: Wei Zhou <57355700+weizhouapache@users.noreply.github.com> Date: Mon, 5 Jul 2021 08:21:07 +0200 Subject: [PATCH] kvm: fix VM HA on zone-wide storage pools (#5164) --- .../kvm/src/main/java/com/cloud/ha/KVMInvestigator.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/ha/KVMInvestigator.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/ha/KVMInvestigator.java index a6cddc7dfab..a76b56a1a4d 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/ha/KVMInvestigator.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/ha/KVMInvestigator.java @@ -85,6 +85,15 @@ public class KVMInvestigator extends AdapterBase implements Investigator { break; } } + if (!hasNfs) { + List 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.");