Bug 1540888

Summary: Tenant/Project Quota fails for Simultaneous requests
Product: Red Hat CloudForms Management Engine Reporter: Vatsal Parekh <vparekh>
Component: AutomateAssignee: Tina Fitzgerald <tfitzger>
Status: CLOSED DUPLICATE QA Contact: Anurag <ansinha>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: akarol, ansinha, cpelland, mkanoor, obarenbo, tfitzger
Target Milestone: GA   
Target Release: 5.9.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-08 22:28:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Comment 2 Tina Fitzgerald 2018-02-01 16:03:14 UTC
I believe this is working as designed. The following comment taken from:
https://bugzilla.redhat.com/show_bug.cgi?id=1489507 

Vatsal and I had a BlueJeans session this morning to discuss quota and how active provisions are calculated.

The current quota calculations for active provisions includes all active requests and each active request considers all other active requests.

The following example was taken from the test appliance Vatsal setup for quota.

The automation.log shows 2 requests, request 8 and 9, both active.  The quota calculations for request 8 would include counts from request 9, and the quota calculations for request 9 would include counts from request 8.  This is by design, the goal being to not over allocate quota as previously reported.
 
[----] I, [2018-02-01T10:17:04.034729 #1985:5c62320]  INFO -- : Q-task_id([service_template_provision_request_8]) <AEMethod used> Quota Used: {:cpu=>0, :memory=>0, :vms=>0, :storage=>0, :provisioned_storage=>0}

[----] I, [2018-02-01T10:17:04.040796 #1985:5c62320]  INFO -- : Q-task_id([service_template_provision_request_8]) <AEMethod used> Quota source type: group

[----] I, [2018-02-01T10:17:04.108723 #1985:5c62320]  INFO -- : Q-
task_id([service_template_provision_request_8]) <AEMethod used> Quota active_provisions_by_group: {:cpu=>3, :memory=>3221225472, :vms=>3, :storage=>603979776, :provisioned_storage=>0}

[----] I, [2018-02-01T10:17:04.112748 #1985:5c62320]  INFO -- : Q-task_id([service_template_provision_request_8]) <AEMethod used> Quota Totals: {:cpu=>3, :memory=>3221225472, :vms=>3, :storage=>603979776, :provisioned_storage=>0}

----] I, [2018-02-01T10:17:05.611724 #1995:c24659c]  INFO -- : Q-task_id([service_template_provision_request_9]) <AEMethod used> Quota Used: {:cpu=>0, :memory=>0, :vms=>0, :storage=>0, :provisioned_storage=>0}
[----] I, [2018-02-01T10:17:05.615621 #1995:c24659c]  INFO -- : Q-task_id([service_template_provision_request_9]) <AEMethod used> Quota source type: group
[----] I, [2018-02-01T10:17:05.660655 #1995:c24659c]  INFO -- : Q-task_id([service_template_provision_request_9]) <AEMethod used> Quota active_provisions_by_group: {:cpu=>3, :memory=>3221225472, :vms=>3, :storage=>603979776, :provisioned_storage=>0}
[----] I, [2018-02-01T10:17:05.664677 #1995:c24659c]  INFO -- : Q-task_id([service_template_provision_request_9]) <AEMethod used> Quota Totals: {:cpu=>3, :memory=>3221225472, :vms=>3, :storage=>603979776, :provisioned_storage=>0}

Comment 3 Vatsal Parekh 2018-02-02 07:11:22 UTC
So this BZ is not a issue, rather a fix maybe, and as tenant/project quota is also same as group in active_provisionin, I think this issue can be tracked at the same ticket https://bugzilla.redhat.com/show_bug.cgi?id=1489507

Comment 4 Tina Fitzgerald 2018-02-08 22:28:26 UTC
Closing as a duplicate of:
https://bugzilla.redhat.com/show_bug.cgi?id=1489507

*** This bug has been marked as a duplicate of bug 1489507 ***