Bug 844917

Summary: Prestarted VM: When admin tries to run a VM from pool which has some prestarted VMs in UserPortal - operation rolls back
Product: Red Hat Enterprise Virtualization Manager Reporter: Tomas Dosek <tdosek>
Component: ovirt-engineAssignee: Tomas Jelinek <tjelinek>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Dosek <tdosek>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: dyasny, iheim, lpeer, michal.skrivanek, oramraz, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: si15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 20:03:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Dosek 2012-08-01 09:10:01 UTC
Description of problem:
started VM: When admin tries to run a VM from pool which has some prestarted VMs in UserPortal - operation rolls back.

Version-Release number of selected component (if applicable):
si12

How reproducible:
100 %

Steps to Reproduce:
1. Have a VM Pool with prestarted VM, SuperUser (admin@internal) must have User permissions on the pool
2. Login to User Portal as this SuperUser and try to take VM

  
Actual results:
Operation rolls back and admin is not granted a VM

Expected results:
Admin should be granted a VM

Additional info: LOG:

2012-08-01 11:04:37,759 INFO  [org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand] (ajp-/127.0.0.1:8009-1) [56b2182b] Lock Acquired to object EngineLock [exclusiveLocks= key: fdfc627c-d875-11e0-90f0-83df133b58cc value: org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand
, sharedLocks= ]
2012-08-01 11:04:37,777 INFO  [org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand] (ajp-/127.0.0.1:8009-1) [56b2182b] Running command: AttachUserToVmFromPoolAndRunCommand internal: false. Entities affected :  ID: 7198f666-dbb6-11e1-8a9e-001a4a013f58 Type: VmPool
2012-08-01 11:04:37,803 INFO  [org.ovirt.engine.core.bll.AddPermissionCommand] (ajp-/127.0.0.1:8009-1) [14ae54ab] Running command: AddPermissionCommand internal: true. Entities affected :  ID: ed217ed7-ea06-4019-9efb-f3a070705785 Type: VM
2012-08-01 11:04:37,812 INFO  [org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand] (ajp-/127.0.0.1:8009-1) [14ae54ab] Succceeded giving user fdfc627c-d875-11e0-90f0-83df133b58cc permission to Vm ed217ed7-ea06-4019-9efb-f3a070705785 
2012-08-01 11:04:37,814 INFO  [org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand] (ajp-/127.0.0.1:8009-1) [14ae54ab] Command [id=caa879de-42a5-4025-a6b4-4b7485338134]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.permissions; snapshot: daebee5f-5395-4e14-836c-e373c1a5e9bb.
2012-08-01 11:04:37,818 ERROR [org.ovirt.engine.core.bll.AddPermissionCommand] (ajp-/127.0.0.1:8009-1) [14ae54ab] Transaction rolled-back for command: org.ovirt.engine.core.bll.AddPermissionCommand.
2012-08-01 11:04:37,818 ERROR [org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand] (ajp-/127.0.0.1:8009-1) [14ae54ab] Transaction rolled-back for command: org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.
2012-08-01 11:04:37,818 INFO  [org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand] (ajp-/127.0.0.1:8009-1) [14ae54ab] Lock freed to object EngineLock [exclusiveLocks= key: fdfc627c-d875-11e0-90f0-83df133b58cc value: org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand

Comment 1 Tomas Jelinek 2012-08-03 09:14:51 UTC
in gerrit: http://gerrit.ovirt.org/#/c/6868/

Comment 3 Tomas Dosek 2012-08-22 07:50:19 UTC
Verified - si15 - above described behaviour no longer reproduces, admin can take a VM from prestarted pool.