Bug 1744845
| Summary: | [Regression] Azure metrics collection is broken in CFME 5.11 | ||
|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Nandini Chandra <nachandr> |
| Component: | Providers | Assignee: | Adam Grare <agrare> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Nandini Chandra <nachandr> |
| Severity: | high | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> |
| Priority: | high | ||
| Version: | 5.11.0 | CC: | dmetzger, jfrey, jhardy, obarenbo, simaishi |
| Target Milestone: | GA | Keywords: | Regression |
| Target Release: | 5.11.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 5.11.0.22 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-12-13 14:54:39 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | Bug | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | Azure | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Nandini Chandra
2019-08-23 01:28:35 UTC
Nandini can you attach the logs? Also, are you sure it worked in 5.11.0.19? There were 0 changes to the azure provider between 5.11.0.19 and 5.11.0.21. There was a fix for azure metrics collection that landed in 5.11.0.19 which might have broken something, but I believe azure metrics collection was totally broken before. We need logs or access to the system The interesting log message is just above: [----] I, [2019-08-22T16:24:15.076229 #7451:2b264d7ac5bc] INFO -- : MIQ(ManageIQ::Providers::Azure::CloudManager#with_provider_connection) Connecting through ManageIQ::Providers::Azure::CloudManager: [azure] [----] W, [2019-08-22T16:24:16.595813 #9276:2b264d7ac5bc] WARN -- : MIQ(ManageIQ::Providers::Azure::CloudManager::MetricsCapture#perf_collect_metrics) Problem collecting metrics for cu-24x7/Automation. Region [eastus2] may not be supported. This triggers an exception handler which catches and logs the exception but doesn't re-raise it. The last line to execute is the _log.warn(), and that returns true. The calling code then sets counters_by_mor, counter_values_by_more = to the return of this method. We shouldn't be returning the result of _log.warn() but should instead just return nil. New commit detected on ManageIQ/manageiq-providers-azure/master: https://github.com/ManageIQ/manageiq-providers-azure/commit/17886fa2c484688646eb9c42d6a39f5e9a465540 commit 17886fa2c484688646eb9c42d6a39f5e9a465540 Author: Adam Grare <agrare> AuthorDate: Fri Aug 23 15:40:13 2019 -0400 Commit: Adam Grare <agrare> CommitDate: Fri Aug 23 15:40:13 2019 -0400 Always return counters and counter_values Always return two hashes from perf_capture_metrics because the calling method expects it. Catching an exception and logging the error without returning the proper values leads to: ``` [NoMethodError]: undefined method `[]' for true:TrueClass ``` Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1744845 app/models/manageiq/providers/azure/cloud_manager/metrics_capture.rb | 12 +- spec/models/manageiq/providers/azure/cloud_manager/metrics_capture_spec.rb | 16 +- 2 files changed, 22 insertions(+), 6 deletions(-) New commit detected on ManageIQ/manageiq-providers-azure/ivanchuk: https://github.com/ManageIQ/manageiq-providers-azure/commit/5580800d8dda51769c023f794ae177e92ba4620f commit 5580800d8dda51769c023f794ae177e92ba4620f Author: Ladislav Smola <lsmola> AuthorDate: Fri Aug 23 17:36:45 2019 -0400 Commit: Ladislav Smola <lsmola> CommitDate: Fri Aug 23 17:36:45 2019 -0400 Merge pull request #345 from agrare/bz_1744845_azure_metrics_collection_failure Always return counters and counter_values (cherry picked from commit 6d6f4b97ba28e314f7afbb249e46fb1c62e960bd) https://bugzilla.redhat.com/show_bug.cgi?id=1744845 app/models/manageiq/providers/azure/cloud_manager/metrics_capture.rb | 12 +- spec/models/manageiq/providers/azure/cloud_manager/metrics_capture_spec.rb | 16 +- 2 files changed, 22 insertions(+), 6 deletions(-) Fixed in 5.11.0.22 *** Bug 1762417 has been marked as a duplicate of this bug. *** |