Arik Hadas has submitted this change and it was merged.
Change subject: core: Refactoring of VM from pool allocation process
......................................................................
core: Refactoring of VM from pool allocation process
All functionality of looking for an available VM in a pool and taking
locks on it is moved to a separate class VmPoolHandler. Both
VmPoolMonitor and AttachUserToVmFromPoolAndRunCommand are using it.
Every VM that needs to be run is locked at the moment it is found. This
approach helps to prevent race conditions and makes any internal lock
objects redundant.
Change-Id: I6bbc6d650e0a706f7ff9970ac2dd425e20b6bfc8
Signed-off-by: Shmuel Melamud <smelamud(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachUserToVmFromPoolAndRunCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmPoolCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolHandler.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolMonitor.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AttachUserToVmFromPoolAndRunParameters.java
7 files changed, 484 insertions(+), 402 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/61228
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6bbc6d650e0a706f7ff9970ac2dd425e20b6bfc8
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shmuel Leib Melamud <smelamud(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>