Skip to content

Commit e5ae323

Browse files
committed
Fix HA bug when VMs are stopped on agent disconnect (apache#26)
When an agent is disconnected due to a network issue, the HA work kicks in and stops some VMs. This is a quick fix to avoid restarting any VMs until the bug is found and fixed.
1 parent 56a3526 commit e5ae323

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server/src/com/cloud/ha/HighAvailabilityManagerImpl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,9 @@ public void scheduleRestartForVmsOnHost(final HostVO host, boolean investigate)
282282
+ hostId + " VM HA is done");
283283
continue;
284284
}
285-
scheduleRestart(vm, investigate);
285+
if (vm.isHaEnabled()) {
286+
scheduleRestart(vm, investigate);
287+
}
286288
}
287289
}
288290

@@ -497,7 +499,7 @@ protected Long restart(final HaWorkVO work) {
497499

498500
boolean fenced = false;
499501
if (alive == null) {
500-
s_logger.debug("Fencing off VM that we don't know the state of");
502+
s_logger.debug("Fencing off VM " + vm + " that we don't know the state of");
501503
for (FenceBuilder fb : fenceBuilders) {
502504
Boolean result = fb.fenceOff(vm, host);
503505
s_logger.info("Fencer " + fb.getName() + " returned " + result);

0 commit comments

Comments
 (0)