Bug 850741 - VM is not returned back to automatic pool and user permissions stay active on it
VM is not returned back to automatic pool and user permissions stay active on it
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Omer Frenkel
Pavel Stehlik
virt
:
: 852082 (view as bug list)
Depends On:
Blocks: 804248
  Show dependency treegraph
 
Reported: 2012-08-22 05:53 EDT by Tomas Dosek
Modified: 2015-09-22 09 EDT (History)
12 users (show)

See Also:
Fixed In Version: si16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 196053 None None None 2012-09-04 14:36:31 EDT

  None (edit)
Description Tomas Dosek 2012-08-22 05:53:39 EDT
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 08:55:42 EDT
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 09:14:51 EDT
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 13:09:16 EDT
But happens only when you change the permissions,right?
Comment 4 Bryan Yount 2012-08-24 18:32:55 EDT
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 03:14:24 EDT
http://gerrit.ovirt.org/#/c/7484/
Comment 10 Itamar Heim 2012-09-02 06:39:36 EDT
*** Bug 852082 has been marked as a duplicate of this bug. ***
Comment 11 Bryan Yount 2012-09-04 14:32:04 EDT
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.