Bug 1785374

Summary: C&U collection for VMWare shows error `undefined method `+' for nil:NilClass Method:[block in method_missing]`
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: C&U Capacity and UtilizationAssignee: Adam Grare <agrare>
Status: CLOSED ERRATA QA Contact: Nandini Chandra <nachandr>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.9.7CC: agrare, dmetzger, nansari, niroy, obarenbo
Target Milestone: GAKeywords: ZStream
Target Release: 5.11.2Flags: pm-rhel: cfme-5.11.z+
simaishi: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.2.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1767747 Environment:
Last Closed: 2020-02-12 05:02:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: VMware Target Upstream Version:
Embargoed:
Bug Depends On: 1767747    
Bug Blocks:    

Comment 2 CFME Bot 2020-01-07 22:25:41 UTC
New commits detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/a195152a4b57fd56956c774295972489db6d3abd
commit a195152a4b57fd56956c774295972489db6d3abd
Author:     Adam Grare <agrare>
AuthorDate: Thu Nov  7 08:51:57 2019 -0500
Commit:     Adam Grare <agrare>
CommitDate: Thu Nov  7 08:51:57 2019 -0500

    Merge pull request #19473 from kbrock/bz_1767747_fix_network_manager_delegate_without_parent_manager

    Return empty array for delegation with nil manager

    (cherry picked from commit fe3f8ea91a23a88195aa9879913a5b0180b30e56)

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

 app/models/manageiq/providers/network_manager.rb | 74 +-
 spec/models/manageiq/providers/network_manager_spec.rb | 37 +-
 2 files changed, 59 insertions(+), 52 deletions(-)


https://github.com/ManageIQ/manageiq/commit/cb6f2fb2c32a53651adf6b2c5020c2d5837a668d
commit cb6f2fb2c32a53651adf6b2c5020c2d5837a668d
Author:     Jason Frey <jfrey>
AuthorDate: Fri Nov  8 12:21:21 2019 -0500
Commit:     Jason Frey <jfrey>
CommitDate: Fri Nov  8 12:21:21 2019 -0500

    Merge pull request #19486 from kbrock/manager_delegate_fixup

    Fix key_pair class lookup

    (cherry picked from commit 4640261fa9b0acc0eee2084785e5d0570578be86)

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

 app/models/manageiq/providers/network_manager.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 3 Nandini Chandra 2020-01-22 17:22:23 UTC
Verified in 5.11.2.0

Comment 4 Nandini Chandra 2020-01-22 17:37:29 UTC
Verified on an appliance managing Nuage and vsphere providers. C&U was enabled for vsphere.

Verified that there were no errors logged in evm.log on an appliance with the fix. I was also able to reproduce the reported issue on an appliance without the fix.Note that no issues were reported with C&U collection by the customer even though errors were logged to evm.log.

[root@dhcp-8-196-198 log]# zgrep NoMethodError evm.log-20200121.gz
[root@dhcp-8-196-198 log]# 

For the purpose of verification, Nuage provider was created manually on the rails console using this command.
[root@dhcp-8-99-111 vmdb]# bin/rails c
Loading production environment (Rails 5.1.7)
irb(main):001:0> ems = ManageIQ::Providers::Nuage::NetworkManager.create(name: "bz-nuage", hostname: "bz-nuage", ipaddress: "11.12.13.14")

Comment 6 errata-xmlrpc 2020-02-12 05:02:46 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/RHBA-2020:0452