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

tnisan at redhat.com tnisan at redhat.com
Mon Jul 4 09:14:23 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=1350403
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, 103 insertions(+), 39 deletions(-)

Approvals:
  Shahar Havivi: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Shmuel Leib Melamud: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2290f7b229041b989011f2acd4bf96af51357f9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6
Gerrit-Owner: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud 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