Bug 1815479 - openstack network manager refresh fails with undefined method `address' for nil
Summary: openstack network manager refresh fails with undefined method `address' for nil
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.11.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.6
Assignee: Marek Aufart
QA Contact: Jad Haj Yahya
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-20 12:05 UTC by drew uhlmann
Modified: 2022-11-14 05:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-10 13:39:10 UTC
Category: Bug
Cloudforms Team: Openstack
Target Upstream Version:
Embargoed:
pm-rhel: cfme-5.11.z+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:2480 0 None None None 2020-06-10 13:39:20 UTC

Description drew uhlmann 2020-03-20 12:05:17 UTC
Description of problem:

openstack network manager refresh fails due to old logging code

getting an ERROR -- : [NoMethodError]: undefined method `address' for nil:NilClass  Method:[block (2 levels) in <class:LogProxy>] because of the following line:

_log.warn "Forbidden response code returned in provider: #{@os_handle.address}. Message=#{err.message}""
looks like that error message was written for "old" refresh
the new inventory/collector doesn't have an @os_handle


see comment 10 in https://bugzilla.redhat.com/show_bug.cgi?id=1803745 for trace

Version-Release number of selected component (if applicable):
 5.11.4.2.20200309205646_632ff59

How reproducible:
every time

Steps to Reproduce:
1. add openstack provider, trigger a refresh
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Dave Johnson 2020-03-20 14:02:22 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 4 Marek Aufart 2020-04-03 13:25:57 UTC
Based on provided backtrace, the error was raised in rescue block for Forbidden error. The forbidden error can happen and not stop the refresh, but the warning log output used @os_handle which is not propably provied by ovirt provider. Update rescue block to ignore nil @os_handle.

If there is an original ovirt environment where this error appeared I could use for ensuring this was the only problem, please provide me the access.

https://github.com/ManageIQ/manageiq-providers-openstack/pull/576

Comment 6 CFME Bot 2020-04-03 17:25:56 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/master:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/e2eb354daa2af6b8d778289a7d115774248e2a1f
commit e2eb354daa2af6b8d778289a7d115774248e2a1f
Author:     Marek Aufart <maufart>
AuthorDate: Fri Apr  3 13:14:26 2020 +0000
Commit:     Marek Aufart <maufart>
CommitDate: Fri Apr  3 13:14:26 2020 +0000

    Update Network Refresh error logging for not-OpenStack provider

    A logic for catch/rescue errors for refresh uses @os_handle for warn logging.
    RHV/ovirt provider uses OpenStack networking, but doesn't provide @os_handle.

    Updating warn error output to use @manager variable with ignore if nil to allow
    pass refresh even with skipped records (as until how, just logging raised the error).

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1815479

 app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb | 8 +-
 1 file changed, 4 insertions(+), 4 deletions(-)

Comment 7 CFME Bot 2020-04-03 20:55:59 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/ivanchuk:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/949892c77d89109704807e348b1f13847c278ccb
commit 949892c77d89109704807e348b1f13847c278ccb
Author:     Adam Grare <agrare>
AuthorDate: Fri Apr  3 17:24:01 2020 +0000
Commit:     Adam Grare <agrare>
CommitDate: Fri Apr  3 17:24:01 2020 +0000

    Merge pull request #576 from aufi/fix_error_handling_outside_openstack_provider

    Update Network Refresh error logging for not-OpenStack provider

    (cherry picked from commit fc1ddbec89cb1d402f50b51eb9c9423c32623f8f)

    https://bugzilla.redhat.com/show_bug.cgi?id=1815479

 app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb | 8 +-
 1 file changed, 4 insertions(+), 4 deletions(-)

Comment 8 Jad Haj Yahya 2020-04-27 12:48:40 UTC
Network manager refresh was not triggered after creating as sec group

Comment 13 errata-xmlrpc 2020-06-10 13:39:10 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-2020:2480


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