Bug 1545322 - Metrics capture logs errors for NetworkPort without ems_ref on Undercloud Network provider
Summary: Metrics capture logs errors for NetworkPort without ems_ref on Undercloud Net...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: GA
: 5.10.0
Assignee: Scott Seago
QA Contact: Ido Ovadia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-14 16:04 UTC by Ido Ovadia
Modified: 2019-02-07 23:01 UTC (History)
7 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:01:17 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
evm log (10.57 KB, text/plain)
2018-02-14 16:04 UTC, Ido Ovadia
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 0 None None None 2019-02-07 23:01:24 UTC

Description Ido Ovadia 2018-02-14 16:04:51 UTC
Created attachment 1396008 [details]
evm log

Description of problem:
=======================
Metrics capture logs errors for NetworkPort without ems_ref on Undercloud Network provider

Error: [undefined method `[]' for nil:NilClass] on evm log

evm.log enclosed 

Version-Release number of selected component:
=============================================
5.9.0.20 + RHOS10
 
How reproducible:
=================
100%

Steps to Reproduce:


Actual results:

Expected results:


Additional info:

Comment 1 Scott Seago 2018-03-26 03:45:51 UTC
There seem to be two different things going on here:
1) Something has caused a NetworkPort to lose its ems_ref (or to never get it in the first place).
2) In trying to map metrics from NetworkPorts to the parent resource for metrics capture, the code is blowing up on a nil ems_ref

For 1), there's no information in the bug report to point to exactly what NetworkPorts have a nil ems_ref and how that came about. If that is, itself, a reproducible event, perhaps that could be fixed separately in another reported bug.

For here, 2) points to an obvious bug in the codebase. We need to check for nil references in the mapping and move onto the next one when it happens (since a NetworkPort nil ems_ref isn't actually useful in mapping from the metrics to the parent resource)

Comment 3 CFME Bot 2018-04-02 18:27:09 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/master:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/ee268196200d7e2c1ae3480a681184d22bcc4459
commit ee268196200d7e2c1ae3480a681184d22bcc4459
Author:     Scott Seago <sseago>
AuthorDate: Wed Mar 28 12:59:10 2018 -0400
Commit:     Scott Seago <sseago>
CommitDate: Wed Mar 28 12:59:10 2018 -0400

    BZ1545322: metrics capture shouldn't fail on nil NetworkPort ems_ref
    https://bugzilla.redhat.com/show_bug.cgi?id=1545322

    Check for nil before attempting to generate a resource ID based on ems_ref

 app/models/manageiq/providers/openstack/base_metrics_capture.rb | 14 +-
 1 file changed, 8 insertions(+), 6 deletions(-)

Comment 4 Ido Ovadia 2018-08-19 15:11:01 UTC
Verified
=========
5.10.0.11

Comment 5 errata-xmlrpc 2019-02-07 23:01:17 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-2019:0212


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