Change in ovirt-engine[ovirt-engine-4.0.1]: core: Take VM lock before assigning a pooled VM to user

tnisan at redhat.com tnisan at redhat.com
Mon Jul 4 15:58:02 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: core: Take VM lock before assigning a pooled VM to user
......................................................................


core: Take VM lock before assigning a pooled VM to user

In AttachUserToVmFromPoolAndRunCommand, take an exclusive lock on the VM
before setting user's ownership on it. This prevents other commands to
act on this VM before it is run as the result of
AttachUserToVmFromPoolAndRunCommand. On another side, if the VM is
already locked by some other command (e.g. RunVmCommand),
AttachUserToVmFromPoolAndRunCommand will not be able to lock it and will
be forced to take another VM from the pool.

Change-Id: Id2290f7b229041b989011f2acd4bf96af51357f9
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1349049
Signed-off-by: Shmuel Melamud <smelamud at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachUserToVmFromPoolAndRunCommand.java
1 file changed, 107 insertions(+), 44 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Arik Hadas: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2290f7b229041b989011f2acd4bf96af51357f9
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0.1
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list