Change in ovirt-engine[master]: core: Fix race between AutoStartVmsRunner and ProcessDownVmC...

Code Review gerrit at ovirt.org
Wed Nov 2 10:04:23 UTC 2016


>From Arik Hadas <ahadas at redhat.com>:

Arik Hadas 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/65906
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2f1a4a1b114fd95c535f41191cd980311f35f6e
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Marek Libra <mlibra at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jakub Niedermertl <jniederm at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marek Libra <mlibra at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list