Created attachment 1396008 [details]
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
Version-Release number of selected component:
22.214.171.124 + RHOS10
Steps to Reproduce:
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)
New commit detected on ManageIQ/manageiq-providers-openstack/master:
Author: Scott Seago <firstname.lastname@example.org>
AuthorDate: Wed Mar 28 12:59:10 2018 -0400
Commit: Scott Seago <email@example.com>
CommitDate: Wed Mar 28 12:59:10 2018 -0400
BZ1545322: metrics capture shouldn't fail on nil NetworkPort ems_ref
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(-)
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.