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

Piotr Kliczewski 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@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: Shahar Havivi: Looks good to me, approved Jenkins CI: Passed CI tests Shmuel Leib Melamud: Verified -- To view, visit https://gerrit.ovirt.org/60018 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-4.0 Gerrit-Owner: Shmuel Leib Melamud <smelamud@redhat.com> Gerrit-Reviewer: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski@gmail.com> Gerrit-Reviewer: Shahar Havivi <shavivi@redhat.com> Gerrit-Reviewer: Shmuel Leib Melamud <smelamud@redhat.com>
participants (1)
-
piotr.kliczewski@gmail.com