Change in ovirt-engine[master]: core: acquire vm lock on RestoreStatelessVm

ahadas at redhat.com ahadas at redhat.com
Thu Jun 23 11:49:28 UTC 2016


Arik Hadas has submitted this change and it was merged.

Change subject: core: acquire vm lock on RestoreStatelessVm
......................................................................


core: acquire vm lock on RestoreStatelessVm

RestoreStatelessVm calls two commands:
1. UpdateVmVersion
2. RestoreAllSnapshots

Both used to take exclusive lock on the VM.
Change I870ef6 modified UpdateVmVersion so it will not
acquire the VM lock when it is called by RestoreStatelessVm
but that's because we assume RestoreStatelessVm locked the
VM which is not always the case.

So this patch changes RestoreStatelessVm to lock the VM.
It is safe to do since UpdateVmVersion and RestoreAllSnapshots
used to do it later in the control flow as well. This lock is
passed to RestoreAllSnapshot so it doesn't try to lock the VM
as well.

Change-Id: I3e52fafa8fcb1976c309e5ea79227e9dc1a3c01c
Bug-Url: https://bugzilla.redhat.com/1346270
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreStatelessVmCommand.java
1 file changed, 18 insertions(+), 0 deletions(-)

Approvals:
  Shahar Havivi: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Shmuel Leib Melamud: Looks good to me, but someone else must approve
  Arik Hadas: Verified
  Liron Aravot: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/59468
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e52fafa8fcb1976c309e5ea79227e9dc1a3c01c
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list