Change in ovirt-engine[ovirt-engine-4.1]: core: Free VM lock if attaching a VM from pool failed

Code Review gerrit at ovirt.org
Mon May 1 12:26:25 UTC 2017


>From Tal Nisan <tnisan at redhat.com>:

Tal Nisan has submitted this change and it was merged.

Change subject: core: Free VM lock if attaching a VM from pool failed
......................................................................


core: Free VM lock if attaching a VM from pool failed

If VM is allocated to user from a VM Pool and the VM is not prestarted,
lock is taken on it early to prevent race condition between
AttachUserToVmFromPoolAndRunCommand and VmPoolMonitor. In regular flow,
this lock is freed by RunVmCommand. But if validation of
AttachUserToVmFromPoolAndRunCommand is failed or exception is thrown for
some reason, this lock must be freed explicitly.

Change-Id: I6d13d3196dd7e2557390675066e0b861071d846f
Bug-Url: https://bugzilla.redhat.com/1433924
Bug-Url: https://bugzilla.redhat.com/1432105
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, 11 insertions(+), 0 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d13d3196dd7e2557390675066e0b861071d846f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.1
Gerrit-Owner: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
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