Bug 1530644
| Summary: | [Regression] Quota check for users errors out with "no implicit conversion of nil into String" for service provisioning | ||
|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Satoe Imaishi <simaishi> |
| Component: | Automate | Assignee: | William Fitzgerald <wfitzger> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Vatsal Parekh <vparekh> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 5.9.0 | CC: | dajohnso, gmccullo, jhardy, mkanoor, obarenbo, smallamp, tfitzger, vparekh, wfitzger |
| Target Milestone: | GA | Keywords: | Regression |
| Target Release: | 5.9.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 5.9.0.15 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1509977 | Environment: | |
| Last Closed: | 2018-03-06 15:08:21 UTC | Type: | --- |
| 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: | |||
| Bug Depends On: | 1509977 | ||
| Bug Blocks: | |||
|
Comment 3
CFME Bot
2018-01-03 16:31:59 UTC
New commit detected on ManageIQ/manageiq-content/gaprindashvili: https://github.com/ManageIQ/manageiq-content/commit/9c904b621f5f20a7919bf271f90a3341057b496a commit 9c904b621f5f20a7919bf271f90a3341057b496a Author: Greg McCullough <gmccullo> AuthorDate: Wed Dec 20 09:19:11 2017 -0500 Commit: Satoe Imaishi <simaishi> CommitDate: Wed Jan 3 11:47:16 2018 -0500 Merge pull request #230 from billfitzgerald0120/user_quota_email Check for both owner email and requester email for user quota. (cherry picked from commit 25317bff448819df562122d670999db6b2813b94) https://bugzilla.redhat.com/show_bug.cgi?id=1530644 .../QuotaMethods.class/__methods__/used.rb | 32 +++++++++---- .../QuotaMethods.class/__methods__/used_spec.rb | 54 ++++++++++++++++++++-- 2 files changed, 75 insertions(+), 11 deletions(-) Vatsal,
We have to fail a Service provision when the quota type is set to User and the User doesn’t have an email address. We changed the code to log an error message, raise an error and abort in the Used Automate method.
Automation.log
[----] I, [2018-01-08T03:57:41.597454 #13141:11d913c] INFO -- : Q-task_id([service_template_provision_request_2]) <AEMethod [/ManageIQ/System/CommonMethods/QuotaMethods/used]> Starting
[----] I, [2018-01-08T03:57:42.152490 #13141:11cb80c] INFO -- : <AEMethod used> Quota Used: {:cpu=>0, :memory=>0, :vms=>0, :storage=>0, :provisioned_storage=>0}
[----] I, [2018-01-08T03:57:42.154985 #13141:11cb80c] INFO -- : <AEMethod used> Quota source type: user
[----] E, [2018-01-08T03:57:42.161054 #13141:11cb80c] ERROR -- : <AEMethod used> Owner email not specified for User Quota
[----] E, [2018-01-08T03:57:42.161665 #13141:11cb80c] ERROR -- : <AEMethod used> The following error occurred during method evaluation:
[----] E, [2018-01-08T03:57:42.162209 #13141:11cb80c] ERROR -- : <AEMethod used> RuntimeError: ERROR - Owner email not specified for User Quota
[----] E, [2018-01-08T03:57:42.164711 #13141:11cb80c] ERROR -- : <AEMethod used> /ManageIQ/System/CommonMethods/QuotaMethods/used:66:in `validate_user_email'
/ManageIQ/System/CommonMethods/QuotaMethods/used:30:in `used'
/ManageIQ/System/CommonMethods/QuotaMethods/used:18:in `main'
[----] E, [2018-01-08T03:57:42.169692 #13141:11cb80c] ERROR -- : Method STDERR: /ManageIQ/System/CommonMethods/QuotaMethods/used:66:in `validate_user_email': ERROR - Owner email not specified for User Quota (RuntimeError)
[----] E, [2018-01-08T03:57:42.170130 #13141:11cb80c] ERROR -- : Method STDERR: from /ManageIQ/System/CommonMethods/QuotaMethods/used:30:in `used'
[----] E, [2018-01-08T03:57:42.170643 #13141:11cb80c] ERROR -- : Method STDERR: from /ManageIQ/System/CommonMethods/QuotaMethods/used:18:in `main'
[----] E, [2018-01-08T03:57:42.171123 #13141:11cb80c] ERROR -- : Method STDERR: from /ManageIQ/System/CommonMethods/QuotaMethods/used:90:in `<main>'
[----] I, [2018-01-08T03:57:42.197715 #13141:11d913c] INFO -- : Q-task_id([service_template_provision_request_2]) <AEMethod [/ManageIQ/System/CommonMethods/QuotaMethods/used]> Ending
Thanks
Billy
Vatsal, Moving the ticket back to ON_QA since it is working as designed. Let me know if you have any questions. Thanks Billy After adding email to the user, this seems to work now on Version 5.9.0.15.20180103231404_ee61a82 Vatsal, I'm not sure why you changed this to assigned. Can you change this to verified? Thanks Billy |