Skip to content

Commit b0a4593

Browse files
Merge pull request #761 from remibergsma/fix-hyperv-returns
Have HyperV behave in 4.4 and return null instead of falseCommit 6a4927f made the HyperV investigator return false instead 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. Tonight I experienced corruption when one of our management servers went down (out-of-memory, not root caused yet). While all hypervisors that were connected to this management server were connecting the other, HA work started as well with investigators. HyperV happily reported everything as down (while it was still running), causing a mess. In 4.5 and master this was already fixed. If you know a better way to fix this, please let me know! This may cause another FindBugs alert, not sure how to resolve that. I just want this out ASAP. Maybe @DaanHoogland @wilderrodrigues or @miguelaferreira can advise on how to fix this properly. * pr/761: Have HyperV behave in 4.4 and return null instead of false Signed-off-by: Wilder Rodrigues <wilder.rodrigues@ekholabs.nl>
2 parents 3b3d2fc + 03929d2 commit b0a4593

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public class HypervInvestigator extends AdapterBase implements Investigator {
4545
public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) {
4646
Status status = isAgentAlive(host);
4747
if (status == null) {
48-
return false;
48+
return null;
4949
}
50-
return status == Status.Up ? true : false;
50+
return status == Status.Up ? true : null;
5151
}
5252

5353
@Override

0 commit comments

Comments
 (0)