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

Code Review gerrit at ovirt.org
Thu Apr 27 11:27:49 UTC 2017


>From Arik Hadas <ahadas at redhat.com>:

Arik Hadas 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/75508
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d13d3196dd7e2557390675066e0b861071d846f
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
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: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list