Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,14 @@ protected boolean handleDisconnectWithInvestigation(final AgentAttache attache,
}
handleDisconnectWithoutInvestigation(attache, event, true, true);
host = _hostDao.findById(hostId); // Maybe the host magically reappeared?
if (host != null && host.getStatus() == Status.Down) {
_haMgr.scheduleRestartForVmsOnHost(host, true);
if (host != null) {
if (host.getStatus() == Status.Down) {
_haMgr.scheduleRestartForVmsOnHost(host, true);
} else {
if (HypervisorType.VMware.equals(host.getHypervisorType()) && host.getStatus() == Status.Alert) {
_haMgr.scheduleRestartForVmsOnHost(host, false);
}
}
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void scheduleRestartForVmsOnHost(final HostVO host, boolean investigate)
return;
}

if (host.getHypervisorType() == HypervisorType.VMware || host.getHypervisorType() == HypervisorType.Hyperv) {
if (host.getHypervisorType() == HypervisorType.Hyperv) {
s_logger.info("Don't restart VMs on host " + host.getId() + " as it is a " + host.getHypervisorType().toString() + " host");
return;
}
Expand Down Expand Up @@ -349,8 +349,8 @@ public void scheduleRestart(VMInstanceVO vm, boolean investigate) {
}
}

if (vm.getHypervisorType() == HypervisorType.VMware || vm.getHypervisorType() == HypervisorType.Hyperv) {
s_logger.info("Skip HA for VMware VM or Hyperv VM" + vm.getInstanceName());
if (vm.getHypervisorType() == HypervisorType.Hyperv) {
s_logger.info("Skip HA for Hyperv VM" + vm.getInstanceName());
return;
}

Expand Down Expand Up @@ -394,11 +394,6 @@ public void scheduleRestart(VMInstanceVO vm, boolean investigate) {
}
}

if (vm.getHypervisorType() == HypervisorType.VMware) {
s_logger.info("Skip HA for VMware VM " + vm.getInstanceName());
return;
}

List<HaWorkVO> items = _haDao.findPreviousHA(vm.getId());
int timesTried = 0;
for (HaWorkVO item : items) {
Expand Down