Jiří Moskovčák has uploaded a new change for review. Change subject: try to start the vm even if other hosts have the same score ......................................................................
try to start the vm even if other hosts have the same score if there are hosts with the same best score all should try to start the VM otherwise we might end up in the situation when every host thinks the others are better and no one will start the VM Change-Id: Ib1ab72dfd8c4f07268eabe3e6fdc7a74929d9308 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1093638 Signed-off-by: Jiri Moskovcak <jmosk...@redhat.com> --- M ovirt_hosted_engine_ha/agent/states.py 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-ha refs/changes/15/31515/1 diff --git a/ovirt_hosted_engine_ha/agent/states.py b/ovirt_hosted_engine_ha/agent/states.py index b6e8d04..2cb2cf4 100644 --- a/ovirt_hosted_engine_ha/agent/states.py +++ b/ovirt_hosted_engine_ha/agent/states.py @@ -441,8 +441,13 @@ logger.info("The engine is not running, but we do not have enough" " data to decide which hosts are alive") return EngineDown(new_data), fsm.WAIT + # there might be more hosts with the same score, so they all + # might try to start the VM, but only one will get the sanlock + # so only one VM should be started, but that's better than situation + # when all have the same score and noone want's to start the vm + # rhbz#1093638 elif (new_data.best_score_host is None or - new_data.best_score_host["score"] < self.score(logger)): + new_data.best_score_host["score"] <= self.score(logger)): # we have the best score at the moment, try starting the engine logger.info("Engine down and local host has best score (%d)," " attempting to start engine VM", -- To view, visit http://gerrit.ovirt.org/31515 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1ab72dfd8c4f07268eabe3e6fdc7a74929d9308 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-ha Gerrit-Branch: ovirt-hosted-engine-ha-1.1 Gerrit-Owner: Jiří Moskovčák <jmosk...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches