Bug 850741 - VM is not returned back to automatic pool and user permissions stay active on it
Summary: VM is not returned back to automatic pool and user permissions stay active on it
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: Omer Frenkel
QA Contact: Pavel Stehlik
URL:
Whiteboard: virt
: 852082 (view as bug list)
Depends On:
Blocks: 804248
TreeView+ depends on / blocked
 
Reported: 2012-08-22 09:53 UTC by Tomas Dosek
Modified: 2018-11-30 21:32 UTC (History)
12 users (show)

Fixed In Version: si16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 196053 0 None None None 2012-09-04 18:36:31 UTC

Description Tomas Dosek 2012-08-22 09:53:39 UTC
Description of problem:
When a user, which has rights on a VM from an automatic pool, looses rights on the pool while (s)he has opened connection to a VM from this pool and closes this connection afterwards user's rights are not deleted fromt he VM and VM doesn't return back to pool. 

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

How reproducible:
100 %

Steps to Reproduce:
1. Have automatic pool and user attached to it
2. From user portal run take a VM and run it and connect to it using spice
3. Remove user's rights on the pool
4. Close the spice session, stop the VM from User Portal
  
Actual results:
VM is still displayed in user's list as rights from it are not deleted and the VM doesn't return to the pool. This results in user's ability to run and use a VM which (s)he shouldn't be able to use.

Expected results:
Vm returned to pool and user doesn't see neither the pool nor the VM in user portal

Comment 1 Michal Skrivanek 2012-08-24 12:55:42 UTC
is this really urgent/urgent?

would it be ok to block the perms change while the VM is used?

Comment 2 Tomas Dosek 2012-08-24 13:14:51 UTC
This is really urgent, because this way users might run out of allocable VMs in pool. (i.e. have 11 users and pool of 10 VMs - 11th user will not be able to allocate pool VM even in case that some other user have already stopped his or her one)

Comment 3 Michal Skrivanek 2012-08-24 17:09:16 UTC
But happens only when you change the permissions,right?

Comment 4 Bryan Yount 2012-08-24 22:32:55 UTC
I will +1 this bug. I ran into it as well when I was testing a hotfix for my customer. We arrived at this same issue with slightly different steps. I was about to open a new bug when I noticed this one. I will post what I had typed up for that bug here...

=====================================

Description of problem:
Using a hotfix provided in Bug #843132 and which will be included in RHEV 3.0.7, when a user's permissions were removed from a pool while the user had a VM running from that pool, the permissions of the user were not actually removed from the running VM, only the pool itself.

Version-Release number of selected component (if applicable):
rhevm-userportal-3.0.5_0001-6.HF.843132.843135.el6_3.x86_64

How reproducible:
Very

Steps to Reproduce:
1. have a user "A" with rights on pool "X"
2. user "A" takes a VM ("VMX-1") from the pool "X" and opens a console
3. a new pool "Y" is created and user "A" gets rights on it, but loses the rights on "X" while VMX-1 is still running
4. user "A" logs into the UserPortal again

Actual results:
The first VM ("VMX-1") is still visible along with an unclaimed VM from pool "Y".

Expected results:
The first VM ("VMX-1") should disappear once the user logs out or powers it off. All that should be visible is an unclaimed VM from pool "Y".

Additional info:
From what I can tell, if you remove the user's permissions on a pool while they have a VM in use from that pool, the workflow that is supposed to happen to "return the VM to the pool" does not occur.

Comment 6 Omer Frenkel 2012-08-27 07:14:24 UTC
http://gerrit.ovirt.org/#/c/7484/

Comment 10 Itamar Heim 2012-09-02 10:39:36 UTC
*** Bug 852082 has been marked as a duplicate of this bug. ***

Comment 11 Bryan Yount 2012-09-04 18:32:04 UTC
Just as a FYI, I only reported this because I tested my customer's hotfix from bug #843132 which will be released with RHEV 3.0.7. Fixing the pool disappearing issue uncovered this new issue in my testing. However, the customer has not independently verified this. Once they do, I will request a Z stream fix if needed.


Note You need to log in before you can comment on or make changes to this bug.