Bug 1256404
| Summary: | Amazon provider fails with: [NoMethodError]: undefined method `keys' for nil:NilClass | ||
|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Joe Vlcek <jvlcek> |
| Component: | Providers | Assignee: | Joe Vlcek <jvlcek> |
| Status: | CLOSED ERRATA | QA Contact: | Nandini Chandra <nachandr> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 5.5.0 | CC: | dajohnso, jfrey, jhardy, jvlcek, mfeifer, obarenbo |
| Target Milestone: | GA | ||
| Target Release: | 5.5.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 5.5.0.5 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-12-08 13:28:15 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Joe Vlcek
2015-08-24 13:40:45 UTC
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/d76eb1c550f7cbf9a32be19c3e37d676d2e80dcc commit d76eb1c550f7cbf9a32be19c3e37d676d2e80dcc Author: Joe VLcek <jvlcek> AuthorDate: Thu Oct 1 16:49:29 2015 -0400 Commit: Joe VLcek <jvlcek> CommitDate: Fri Oct 2 15:58:22 2015 -0400 Handle no AWS metrics collected When AWS has an API failures in their regions, the appliance generates a NoMethodError exception The solution it to ignore empty metrics collections. https://bugzilla.redhat.com/show_bug.cgi?id=1256404 .../amazon/cloud_manager/metrics_capture.rb | 4 +++- spec/factories/metrics_capture_amazon.rb | 12 ++++++++++ spec/factories/vm_amazon.rb | 5 ++++ .../amazon/cloud_manager/metrics_capture_spec.rb | 28 ++++++++++++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 spec/factories/metrics_capture_amazon.rb create mode 100644 spec/models/manageiq/providers/amazon/cloud_manager/metrics_capture_spec.rb Joe, any guesses as to how we can fake this? You could try disabling the network on the appliance after metrics collection has started to emulate an AWS API failures but this may be problematic. I have added new spec tests to exercise the code change for the fix for this BZ. Perhaps the best thing to do is just ensure the appliance correctly collect metrics and rely on the specs to exercise the AWS API failure. Verified that ec2 metrics collection is still happening with the fix. Verified in 5.5.0.13 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 |