Bug 1227931 - Service Quota service_request_rejected automate method puts truncated data in the miq_request reason attribute.
Summary: Service Quota service_request_rejected automate method puts truncated data in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.4.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.5.0
Assignee: Tina Fitzgerald
QA Contact: Jeff Teehan
URL:
Whiteboard:
Depends On:
Blocks: 1231857
TreeView+ depends on / blocked
 
Reported: 2015-06-03 20:55 UTC by Kevin Morey
Modified: 2015-12-08 13:15 UTC (History)
6 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1231857 (view as bug list)
Environment:
Last Closed: 2015-12-08 13:15:49 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Description Kevin Morey 2015-06-03 20:55:35 UTC
Description of problem:
/ RedHat / Service / Provisioning / StateMachines / ServiceProvisionRequestQuotaVerification / service_request_rejected is erroneously putting a 't' in the miq_request.reason. I believe this is because the method has an input string called 'reason' which appears to be truncated the message. In further investigation it turns out that the reason does not need the entire message and can be streamlined into one line as shown below:


#
# Description: This method runs when the service request quota validation has failed
#
$evm.root['miq_request'].deny("admin", "Quota Exceeded")


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

How reproducible:
100%

Below are the steps to fix the problem:
1) change the method to only one line: $evm.root['miq_request'].deny("admin", "Quota Exceeded")

2) remove the input 'reason' string

I have already tested this and have gone through this with Tina. :-)

Comment 2 CFME Bot 2015-06-12 21:09:29 UTC
New commit detected on cfme_productization/master:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=e1393ed02168218a46e2ae4f0f85541dbc7ad1e8

commit e1393ed02168218a46e2ae4f0f85541dbc7ad1e8
Author:     Tina Fitzgerald <tfitzger>
AuthorDate: Thu Jun 4 16:12:52 2015 -0400
Commit:     Tina Fitzgerald <tfitzger>
CommitDate: Tue Jun 9 15:53:17 2015 -0400

    Changed Service Quota request rejected method to remove unnecessary
    quota_reason, log message and reason input field.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1227931

 .../__methods__/service_request_rejected.rb        |  7 ++-----
 .../__methods__/service_request_rejected.yaml      | 22 +---------------------
 2 files changed, 3 insertions(+), 26 deletions(-)

Comment 3 CFME Bot 2015-06-12 21:09:36 UTC
New commit detected on cfme_productization/master:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=95d58af139e5257a90d9bf69f2df2a79996279e9

commit 95d58af139e5257a90d9bf69f2df2a79996279e9
Merge: f2e4891 e1393ed
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Fri Jun 12 17:07:21 2015 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Fri Jun 12 17:07:21 2015 -0400

    Merge branch 'bz_1227931' into 'master'
    
    Changed Service Quota request rejected automate method to remove reason related  code.
    
    Changed Service Quota request rejected method to remove unnecessary quota_reason, log message and reason input field.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1227931
    
    See merge request !60

 .../__methods__/service_request_rejected.rb        |  7 ++-----
 .../__methods__/service_request_rejected.yaml      | 22 +---------------------
 2 files changed, 3 insertions(+), 26 deletions(-)

Comment 4 CFME Bot 2015-06-15 15:16:39 UTC
New commit detected on cfme_productization/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=0223d5417a14e6d6f5beeebafd53101c9eb8480d

commit 0223d5417a14e6d6f5beeebafd53101c9eb8480d
Author:     Tina Fitzgerald <tfitzger>
AuthorDate: Thu Jun 4 16:12:52 2015 -0400
Commit:     Tina Fitzgerald <tfitzger>
CommitDate: Mon Jun 15 09:43:14 2015 -0400

    Changed Service Quota request rejected method to remove unnecessary
    quota_reason, log message and reason input field.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1227931

 .../__methods__/service_request_rejected.rb        |  7 ++-----
 .../__methods__/service_request_rejected.yaml      | 22 +---------------------
 2 files changed, 3 insertions(+), 26 deletions(-)

Comment 5 CFME Bot 2015-06-15 15:16:47 UTC
New commit detected on cfme_productization/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=43cc3a6efd57111f67bbe452496ddb61b94545c3

commit 43cc3a6efd57111f67bbe452496ddb61b94545c3
Merge: 6cec6b0 0223d54
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Mon Jun 15 11:14:39 2015 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Mon Jun 15 11:14:39 2015 -0400

    Merge branch 'cherry_pick_1227931' into '5.4.z'
    
    Changed Service Quota rejected automate method.
    
    Modified request rejected method to remove unnecessary quota_reason, log message and reason input field.
    
    BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1231857
    
    Original MR:
    http://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme_productization/merge_requests/60
    
    Original BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1227931
    
    Clean cherry-pick
    
    See merge request !68

 .../__methods__/service_request_rejected.rb        |  7 ++-----
 .../__methods__/service_request_rejected.yaml      | 22 +---------------------
 2 files changed, 3 insertions(+), 26 deletions(-)

Comment 6 CFME Bot 2015-06-15 15:25:41 UTC
New commit detected on cfme_productization/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=0223d5417a14e6d6f5beeebafd53101c9eb8480d

commit 0223d5417a14e6d6f5beeebafd53101c9eb8480d
Author:     Tina Fitzgerald <tfitzger>
AuthorDate: Thu Jun 4 16:12:52 2015 -0400
Commit:     Tina Fitzgerald <tfitzger>
CommitDate: Mon Jun 15 09:43:14 2015 -0400

    Changed Service Quota request rejected method to remove unnecessary
    quota_reason, log message and reason input field.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1227931

 .../__methods__/service_request_rejected.rb        |  7 ++-----
 .../__methods__/service_request_rejected.yaml      | 22 +---------------------
 2 files changed, 3 insertions(+), 26 deletions(-)

Comment 7 CFME Bot 2015-06-15 15:25:47 UTC
New commit detected on cfme_productization/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=43cc3a6efd57111f67bbe452496ddb61b94545c3

commit 43cc3a6efd57111f67bbe452496ddb61b94545c3
Merge: 6cec6b0 0223d54
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Mon Jun 15 11:14:39 2015 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Mon Jun 15 11:14:39 2015 -0400

    Merge branch 'cherry_pick_1227931' into '5.4.z'
    
    Changed Service Quota rejected automate method.
    
    Modified request rejected method to remove unnecessary quota_reason, log message and reason input field.
    
    BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1231857
    
    Original MR:
    http://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme_productization/merge_requests/60
    
    Original BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1227931
    
    Clean cherry-pick
    
    See merge request !68

 .../__methods__/service_request_rejected.rb        |  7 ++-----
 .../__methods__/service_request_rejected.yaml      | 22 +---------------------
 2 files changed, 3 insertions(+), 26 deletions(-)

Comment 8 Jeff Teehan 2015-10-05 18:27:04 UTC
Verified changes were included in 5.4.2 using (https://10.8.59.221/)

Set a very low quota target to verify call was made correctly.

Moving to Verified.

Comment 10 errata-xmlrpc 2015-12-08 13:15:49 UTC
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/RHSA-2015:2551


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