Bug 904105

Summary: [User Portal] An user with UserVmRole cannot modify VM's properties, DC is in Audit quota mode but the user itself is not consumer of any quota
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-engine-userportalAssignee: Doron Fediuck <dfediuck>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, dyasny, ecohen, iheim, omasad, Rhev-m-bugs, sgrinber, thildred, ykaul, yzaslavs
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sla
Fixed In Version: sf9 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: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 917401    

Description Jiri Belka 2013-01-25 13:16:40 UTC
Description of problem:
Please improve docs for: Assigning a Quota to an Object - Important box.

Something should be added to describe problem when Quota is enabled after there are some VMs and users defined.

Example:

When Quota is enabled and there exists a VM and the VM has assigned users with "administrative" (UserVmManager) roles, defining Quota on objects (VM, disk...) is not enough. The user has to be consumer of the quota too. This would be nice to clarify.

When the user is not consumer, this is in engine.log:

2013-01-25 14:12:04,320 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp-/127.0.0.1:8702-7) [ffe16b] CanDoAction of action UpdateVm failed. Reasons:VAR__ACTION__UPDATE,VAR__TYPE__VM,USER_NOT_AUTHORIZED_TO_PERFORM_ACTION


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

How reproducible:
100%

Steps to Reproduce:
1. Create a VM
2. Asign an user with UserVmManager role to the VM
3. Enable quota on DC
4. Try to change name/description of the VM in User Portal as the user above
  
Actual results:
Cannot change properties, as the user is not consumer of the quota.

Expected results:


Additional info:

Comment 1 Jiri Belka 2013-01-25 13:38:54 UTC
After discussion I decided to change this BZ to real bug as I'm not sure if it is bug or not.

Description of problem:

An user with UserVmRole on a VM cannot modify VM's properties in User Portal, DC has Audit mode of quota, VM is in valid quota but the user itself is not consumer of the quota. Assigning the user to quota as consumer solves the issue, but quota mode is Audit... This is strange.

Error when editing VM's properties:

quotatest:

    User is not authorized to perform this action.

Comment 2 ofri 2013-01-27 14:16:00 UTC
Posted upstream: http://gerrit.ovirt.org/#/c/11418/

Comment 4 Jiri Belka 2013-03-04 15:54:29 UTC
OK, sf9.

Comment 5 Itamar Heim 2013-06-11 08:50:17 UTC
3.2 has been released

Comment 6 Itamar Heim 2013-06-11 08:50:19 UTC
3.2 has been released

Comment 7 Itamar Heim 2013-06-11 08:50:20 UTC
3.2 has been released

Comment 8 Itamar Heim 2013-06-11 08:54:43 UTC
3.2 has been released

Comment 9 Itamar Heim 2013-06-11 09:25:07 UTC
3.2 has been released