Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1317698 - Automate | Quota runs twice for service provisioning.
Automate | Quota runs twice for service provisioning.
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.6.0
Unspecified Unspecified
high Severity high
: GA
: 5.6.0
Assigned To: William Fitzgerald
Milan Falešník
automate:service:provision
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-14 18:17 EDT by Tina Fitzgerald
Modified: 2016-08-10 10:29 EDT (History)
4 users (show)

See Also:
Fixed In Version: 5.6.0.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-29 11:42:40 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-14 18:17:25 EDT
Description of problem: Quota check done twice during service provisioning.  

Both /System/Policy/ServiceTemplateProvisionRequest_starting and
/Service/Provisioning/StateMachines/ServiceProvisionRequestApproval/Default instances call quota. 
Quota should be removed from the ServiceProvisionRequestApproval instance.  

/System/Policy:
ServiceTemplateProvisionRequest_created - Calls the auto-approval state machine.
ServiceTemplateProvisionRequest_approved - Sends the approval emails.
ServiceTemplateProvisionRequest_starting - Does quota check.


Steps to Reproduce:
1. Provision a service.
2. Check the automation.log to see both quota checks, one for ServiceTemplateProvisionRequest_created, and ServiceTemplateProvisionRequest_starting.


Actual results:
Quota executed twice. 

Expected results:
Quota executed once. 


Additional info:
Comment 3 CFME Bot 2016-03-28 16:50:42 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/86855b499a503a43a0506a0f633a9b5c5052f69b

commit 86855b499a503a43a0506a0f633a9b5c5052f69b
Author:     william fitzgerald <wfitzger@redhat.com>
AuthorDate: Thu Mar 17 14:15:06 2016 -0400
Commit:     william fitzgerald <wfitzger@redhat.com>
CommitDate: Thu Mar 17 14:16:19 2016 -0400

    Automate - Fixed quota running twice in service provisioning
    
    Removed quota from the ServiceProvisionRequestApproval instance
    
    Modified ServiceProvisionRequestApproval.class/default.yaml
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1317698

 .../StateMachines/ServiceProvisionRequestApproval.class/default.yaml | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
Comment 6 Tina Fitzgerald 2016-04-19 14:22:53 EDT
Hi Milan,

I can't tell from the log snippet because there's no reference to quota.

You should see this string only once per service provision and it should be during the ServiceTemplateProvisionRequest_starting processing:
 
"Getting Tenant Quota Values for:"

Thanks,
Tina
Comment 7 Milan Falešník 2016-04-22 10:00:38 EDT
It seems that that is correct:

[----] I, [2016-04-22T09:54:03.293420 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Following Relationship [miqaedb:/System/Policy/ServiceTemplateProvisionRequest_starting#create]
[----] I, [2016-04-22T09:54:03.299149 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Updated namespace [miqaedb:/System/Policy/ServiceTemplateProvisionRequest_starting#create  ManageIQ/System]
[----] I, [2016-04-22T09:54:03.311689 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Following Relationship [miqaedb:/System/CommonMethods/QuotaStatemachine/quota#create]
[----] I, [2016-04-22T09:54:03.332753 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Updated namespace [miqaedb:/System/CommonMethods/QuotaStatemachine/quota#create  ManageIQ/System/CommonMethods]
[----] I, [2016-04-22T09:54:03.379301 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Processing State=[quota_source]
[----] I, [2016-04-22T09:54:03.379654 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Following Relationship [miqaedb:/System/CommonMethods/QuotaMethods/quota_source#create]
[----] I, [2016-04-22T09:54:03.393474 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Updated namespace [miqaedb:/System/CommonMethods/QuotaMethods/quota_source#create  ManageIQ/System/CommonMethods]
[----] I, [2016-04-22T09:54:03.411676 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Updated namespace [System/CommonMethods/QuotaMethods/quota_source  ManageIQ/System/CommonMethods]
[----] I, [2016-04-22T09:54:03.421318 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Invoking [inline] method [/ManageIQ/System/CommonMethods/QuotaMethods/quota_source] with inputs [{}]
[----] I, [2016-04-22T09:54:03.422462 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) <AEMethod [/ManageIQ/System/CommonMethods/QuotaMethods/quota_source]> Starting 
[----] I, [2016-04-22T09:54:04.493016 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) <AEMethod [/ManageIQ/System/CommonMethods/QuotaMethods/quota_source]> Ending
[----] I, [2016-04-22T09:54:04.493172 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Method exited with rc=MIQ_OK
[----] I, [2016-04-22T09:54:04.493660 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Followed  Relationship [miqaedb:/System/CommonMethods/QuotaMethods/quota_source#create]
[----] I, [2016-04-22T09:54:04.493872 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Processed  State=[quota_source] with Result=[ok]
[----] I, [2016-04-22T09:54:04.494016 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Processed State =[quota_source]
[----] I, [2016-04-22T09:54:04.494413 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Next State=[limits]
[----] I, [2016-04-22T09:54:04.494862 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Processing State=[limits]
[----] I, [2016-04-22T09:54:04.495183 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Following Relationship [miqaedb:/System/CommonMethods/QuotaMethods/limits#create]
[----] I, [2016-04-22T09:54:04.505405 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Updated namespace [miqaedb:/System/CommonMethods/QuotaMethods/limits#create  ManageIQ/System/CommonMethods]
[----] I, [2016-04-22T09:54:04.521812 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Updated namespace [System/CommonMethods/QuotaMethods/limits  ManageIQ/System/CommonMethods]
[----] I, [2016-04-22T09:54:04.533858 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Invoking [inline] method [/ManageIQ/System/CommonMethods/QuotaMethods/limits] with inputs [{}]
[----] I, [2016-04-22T09:54:04.535290 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) <AEMethod [/ManageIQ/System/CommonMethods/QuotaMethods/limits]> Starting 
[----] I, [2016-04-22T09:54:05.315108 #12462:104ff64]  INFO -- : Q-task_id([service_template_provision_request_1]) <AEMethod limits> Getting Tenant Quota Values for: {}
[----] I, [2016-04-22T09:54:05.318952 #12462:104ff64]  INFO -- : Q-task_id([service_template_provision_request_1]) <AEMethod limits> No Quota limits set. No quota check being done.
[----] I, [2016-04-22T09:54:05.360690 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) <AEMethod [/ManageIQ/System/CommonMethods/QuotaMethods/limits]> Ending
[----] I, [2016-04-22T09:54:05.360808 #12462:b47990]  INFO -- : Q-task_id([service_template_provision_request_1]) Method exited with rc=MIQ_OK

That was the only occurence of this string in 5.6.0.4-beta2.3, so verified then.
Comment 9 errata-xmlrpc 2016-06-29 11:42:40 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.