Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1319910 - [RFE] Automate | Quota - Change consolidated quota schema to add quota source attribute.
[RFE] Automate | Quota - Change consolidated quota schema to add quota source...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.6.0
Unspecified Unspecified
medium Severity low
: GA
: 5.6.0
Assigned To: William Fitzgerald
Milan Falešník
automate:quota
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-21 15:17 EDT by Tina Fitzgerald
Modified: 2016-06-29 11:44 EDT (History)
11 users (show)

See Also:
Fixed In Version: 5.6.0.1
Doc Type: Enhancement
Doc Text:
In the previous version of CloudForms Management Engine, /System/CommonMethods/QuotaMethods quota_source method had code to enable user or group as the quota source instead of the tenant default quota source. It shouldn't be necessary to modify a method to change the quota source. This release added quota_source_type attribute to QuotaStateMachines class.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-29 11:44:19 EDT
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 Product Errata RHBA-2016:1348 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 14:50:04 EDT

  None (edit)
Description Tina Fitzgerald 2016-03-21 15:17:59 EDT
Description of problem:
/System/CommonMethods/QuotaMethods quota_source method has code to enable user or group as the quota source instead of the tenant default quota source. It should'nt be necessary to modify a method to change the quota source. 

1. Add an attribute to the class schema called quota_source and set the value to "tenant". 
2. Modify the quota_source method to determine quota source from the attribute instead of being set in the method. 

Steps to Reproduce:
1. Test quota for both "tenant" and "group" quota_sources.
2. Make code changes described above.
3. Repeat step 1.

Actual results:
The results should be identical.
Comment 3 CFME Bot 2016-04-12 10:11:15 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/bdd8102d1ed76a2162283da3f9eaf07c45836d2e

commit bdd8102d1ed76a2162283da3f9eaf07c45836d2e
Author:     william fitzgerald <wfitzger@redhat.com>
AuthorDate: Tue Mar 29 15:16:08 2016 -0400
Commit:     william fitzgerald <wfitzger@redhat.com>
CommitDate: Fri Apr 1 17:06:59 2016 -0400

    Automate - Change consolidated quota schema to add quota source attribute
    
    Added quota_source_type attribute to QuotaStateMachines class
    
    Modified quota_source.rb to determine quota type
    
    Updated quota_source spec
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1319910

 .../QuotaMethods.class/__methods__/quota_source.rb | 20 ++++-----
 .../QuotaStateMachine.class/__class__.yaml         | 48 +++++++++++++++-------
 .../QuotaStateMachine.class/quota.yaml             |  2 +
 .../unit/method_validation/quota_source_spec.rb    | 17 ++++++--
 4 files changed, 58 insertions(+), 29 deletions(-)
Comment 4 Tina Fitzgerald 2016-04-19 14:15:26 EDT
Hi Milan,

Since this commit only changes the way the quota source is updated, the best way to validate it is to look in the automation.log.
The default quota_source is tenant.

To validate:
1. Add tenant quota values <-- Configure/Configuration/Access Control/Tenants
(There has to be at least one value set to run through quota)
2. Provision a VM or Service.
3. Check automation.log for ""Getting Tenant Quota Values for:" string.
4. Change quota_source value to group. <-- /System/CommonMethods/QuotaStateMachine
5. Repeat Step 2.
6. Check automation.log for "Getting Quota Values for Model:" string.
 
Thanks,
Tina
Comment 5 Milan Falešník 2016-05-09 07:52:04 EDT
Verified in 5.6.0.5-beta2.4

With tenant (1000CPU, 1000G):
[root@host vmdb]# tail -fn0 log/automation.log | egrep "Getting Tenant Quota Values for"
[----] I, [2016-05-09T07:22:00.401532 #3113:5b72154]  INFO -- : Q-task_id([miq_provision_request_2]) <AEMethod limits> Getting Tenant Quota Values for: {:cpu=>1000, :memory=>1073741824000}

When changed to group (copied the instance to new domain and changed):
[root@host vmdb]# tail -fn0 log/automation.log | egrep "Getting Quota Values"
[----] I, [2016-05-09T07:49:52.707815 #3119:ff472c]  INFO -- : Q-task_id([miq_provision_request_5]) <AEMethod limits> Getting Quota Values for Model: max_storage Tag Name: quota_max_storage
[----] I, [2016-05-09T07:49:52.716141 #3119:ff472c]  INFO -- : Q-task_id([miq_provision_request_5]) <AEMethod limits> Getting Quota Values for Model: warn_storage Tag Name: quota_warn_storage
[----] I, [2016-05-09T07:49:52.720514 #3119:ff472c]  INFO -- : Q-task_id([miq_provision_request_5]) <AEMethod limits> Getting Quota Values for Model: max_vms Tag Name: quota_max_vms
[----] I, [2016-05-09T07:49:52.725106 #3119:ff472c]  INFO -- : Q-task_id([miq_provision_request_5]) <AEMethod limits> Getting Quota Values for Model: warn_vms Tag Name: quota_warn_vms
[----] I, [2016-05-09T07:49:52.729498 #3119:ff472c]  INFO -- : Q-task_id([miq_provision_request_5]) <AEMethod limits> Getting Quota Values for Model: max_cpu Tag Name: quota_max_cpu
[----] I, [2016-05-09T07:49:52.734239 #3119:ff472c]  INFO -- : Q-task_id([miq_provision_request_5]) <AEMethod limits> Getting Quota Values for Model: warn_cpu Tag Name: quota_warn_cpu
[----] I, [2016-05-09T07:49:52.740821 #3119:ff472c]  INFO -- : Q-task_id([miq_provision_request_5]) <AEMethod limits> Getting Quota Values for Model: max_memory Tag Name: quota_max_memory
[----] I, [2016-05-09T07:49:52.745382 #3119:ff472c]  INFO -- : Q-task_id([miq_provision_request_5]) <AEMethod limits> Getting Quota Values for Model: warn_memory Tag Name: quota_warn_memory

Discovered https://bugzilla.redhat.com/show_bug.cgi?id=1334318 in the process.
Comment 7 errata-xmlrpc 2016-06-29 11:44:19 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1348

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