Change in ovirt-engine[ovirt-engine-4.0]: core: Fix race between AutoStartVmsRunner and ProcessDownVmC...
Code Review
gerrit at ovirt.org
Thu Nov 3 13:51:39 UTC 2016
>From Tal Nisan <tnisan at redhat.com>:
Tal Nisan has submitted this change and it was merged.
Change subject: core: Fix race between AutoStartVmsRunner and ProcessDownVmCommand
......................................................................
core: Fix race between AutoStartVmsRunner and ProcessDownVmCommand
Issue for killed HA VM:
AutoStartVmsRunner acquires lock and runs the HA VM if there's
no NEXT_RUN. It causes race condition between removing the NEXT_RUN
snapshot in ProcessDownVmCommand.applyNextRunConfiguration() and
calling UpdateVmCommand to apply it.
The UpdateVmCommand fails to acquire locks if the RunVm command
is executed right after the NEXT_RUN snapshot is removed.
Fixed by:
ProcessDownVmCommand.applyNextRunConfiguration() acquires
lock before removing the NEXT_RUN snapshot and passes it to
the UpdateVmCommand.
The AutoStartVmsRunner keeps failing to acquire the VM lock until
the NEXT_RUN is applied.
Change-Id: Ie2f1a4a1b114fd95c535f41191cd980311f35f6e
Bug-Url: https://bugzilla.redhat.com/1369521
Signed-off-by: Marek Libra <mlibra at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ProcessDownVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
2 files changed, 43 insertions(+), 16 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Marek Libra: Verified
Arik Hadas: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/66006
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2f1a4a1b114fd95c535f41191cd980311f35f6e
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Marek Libra <mlibra at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marek Libra <mlibra at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list