Change in ovirt-engine[master]: core: Update number of prestarted VMs after detaching a VM f...

ahadas at redhat.com ahadas at redhat.com
Sun May 1 13:14:07 UTC 2016


Arik Hadas has submitted this change and it was merged.

Change subject: core: Update number of prestarted VMs after detaching a VM from Pool
......................................................................


core: Update number of prestarted VMs after detaching a VM from Pool

Added a field to RemoveVmFromPoolParameters to update the number of
prestarted VMs in the VM Pool, if it becomes larger than number of
assigned VMs after detaching one of them. To update the number
RemoveVmFromPoolCommand takes a shared lock on the VM Pool.

This feature is activated only when a VM is detached from a Pool via UI
or REST API. It is not used (and the lock is not taken), when:

* VM Pool is removed, because prestartedVms is set to 0 at the
beginning of RemoveVmPoolCommand.
* Version of the template used for the Pool is updated, because all VMs
that are removed will be added again soon.

Change-Id: Ib864d6def677e24aa2624877e50e2ff8a8b7d1a7
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1282218
Signed-off-by: Shmuel Melamud <smelamud at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmFromPoolCommand.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/UpdateVmVersionCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/RemoveVmFromPoolParameters.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/EngineMessage.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmPoolDao.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmPoolDaoImpl.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolVmListModel.java
M packaging/dbscripts/vm_pools_sp.sql
12 files changed, 92 insertions(+), 14 deletions(-)

Approvals:
  Eli Mesika: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Shmuel Leib Melamud: Verified
  Arik Hadas: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib864d6def677e24aa2624877e50e2ff8a8b7d1a7
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika 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: Shmuel Melamud <smelamud at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list