Bug 1731056 - Group in quota consumer not working
Summary: Group in quota consumer not working
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Hardware: All
OS: All
Target Milestone: ovirt-4.4.0
: ---
Assignee: Andrej Krejcir
QA Contact: Lukas Svaty
Depends On:
TreeView+ depends on / blocked
Reported: 2019-07-18 08:56 UTC by Christoph
Modified: 2019-09-12 16:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-09-12 16:53:55 UTC
oVirt Team: Virt
pm-rhel: ovirt-4.4+

Attachments (Terms of Use)

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.]

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

I just have retested on my new 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.

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