Tomas Jelinek has uploaded a new change for review.

Change subject: userportal: When can not take VM from pool, UP throws an 
exception
......................................................................

userportal: When can not take VM from pool, UP throws an exception

When tring to take a VM from a pool, but it did not succeeded
(e.g. because there are no available VMs in the pool), than the
UP throws an UnsupportedOperationException, the model gets in
incorrect state and the UP is not functional any more.

The problem was, that the PoolItemBehaviour.TakeVm() was
not checking the result of the AttachUserToVmFromPoolAndRun
callback and tried to work with the taken VM immediately.
Because the taking of the VM failed, the VM was null and the
UserPoralItemModel.OnEntityChanged() did throw an
UnsupportedOperationException.

Solved by adding a check if the operation succeeded to the
PoolItemBehaviour.TakeVm() and continue only if yes.

Change-Id: If110f01cf2abcd8866ac970b6ac4dabf2df7c4cc
Signed-off-by: Tomas Jelinek <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/PoolItemBehavior.java
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/88/4888/1
--
To view, visit http://gerrit.ovirt.org/4888
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If110f01cf2abcd8866ac970b6ac4dabf2df7c4cc
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to