From 03929d24f78c10128aaf788b832edfcf3594004f Mon Sep 17 00:00:00 2001 From: Remi Bergsma Date: Sat, 29 Aug 2015 23:58:00 +0200 Subject: [PATCH] Have HyperV behave in 4.4 and return null instead of false Commit 6a4927f660f776bcbd12ae45f4e63ae2c2e96774 made the HyperV investigator return false insteads of null. Returning false means the VM is NOT running, returning null means "I don't know". In 4.4 I experienced corruption because of HyperV returning false, instead of null. --- .../hyperv/src/com/cloud/ha/HypervInvestigator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java b/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java index 01d75fa64ce1..cebfb7ac70c1 100644 --- a/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java +++ b/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java @@ -45,9 +45,9 @@ public class HypervInvestigator extends AdapterBase implements Investigator { public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) { Status status = isAgentAlive(host); if (status == null) { - return false; + return null; } - return status == Status.Up ? true : false; + return status == Status.Up ? true : null; } @Override