Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1731056

Summary: Group in quota consumer not working
Product: [oVirt] ovirt-engine Reporter: Christoph <ovirt>
Component: Frontend.WebAdminAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED WORKSFORME QA Contact: Lukas Svaty <lsvaty>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.4.3CC: bugs, michal.skrivanek, rbarry
Target Milestone: ovirt-4.4.0Flags: pm-rhel: ovirt-4.4+
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-12 16:53:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christoph 2019-07-18 08:56:32 UTC
Description of problem:

It is not possible to create a VM through the VM portal if only the group is added as consumer. Currently it is required to add each user and not only the group.


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


How reproducible:


Steps to Reproduce:
1. add group to consumer of quota
2. login to VM portal with the user from that group
3. create a new VM

Actual results:

Browser failure:
CREATE_VM failed [Cannot add VM. The user is not a consumer of the Quota assigned to the resource.]

engine.log
2019-07-18 10:51:19,384+02 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (default task-42) [f2038d27-e922-4ad9-9438-c75eeff8d7bd] No permission found for user 'ed00de48-ad18-4a61-a903-93a7a1e21677' or one of the groups he is member of, when running action 'AddVmFromScratch', Required permissions are: Action type: 'USER' Action group: 'CONSUME_QUOTA' Object type: 'Quota'  Object ID: 'bb33400a-a860-11e9-9a43-00163e015afe'.
2019-07-18 10:51:19,384+02 WARN  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (default task-42) [f2038d27-e922-4ad9-9438-c75eeff8d7bd] Validation of action 'AddVmFromScratch' failed for user test2@internal-authz. Reasons: VAR__ACTION__ADD,VAR__TYPE__VM,USER_NOT_AUTHORIZED_TO_CONSUME_QUOTA
2019-07-18 10:51:19,390+02 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-42) [] Operation Failed: [Cannot add VM. The user is not a consumer of the Quota assigned to the resource.]



Expected results:
VM could be created

Comment 1 Michal Skrivanek 2019-07-19 06:33:18 UTC
sound like a problem with quota permissions check - virt

Comment 2 Andrej Krejcir 2019-09-12 08:15:36 UTC
I have just tested this and the VM can be created.

What are the exact permissions on the group and the user?
Have you created the VM from a template that has a quota assigned?

A new VM without a template has the Default quota assigned, because it cannot be changed in the VM portal.

Comment 3 Christoph 2019-09-12 16:53:55 UTC
Hi,

I just have retested on my new 4.3.5.4 system and can confirm that this is working now.
Maybe this have been fixed between 4.3.4 and 4.3.5.

Guess you can close the ticket.

Thank you for your support.