Bug 1436853

Summary: Vmware infra provider refresh fail
Product: Red Hat CloudForms Management Engine Reporter: Saif Ali <saali>
Component: ProvidersAssignee: Adam Grare <agrare>
Status: CLOSED CURRENTRELEASE QA Contact: Alex Newman <anewman>
Severity: high Docs Contact:
Priority: high    
Version: 5.7.0CC: akarol, dajohnso, greartes, jfrey, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1439944 1439945 (view as bug list) Environment:
Last Closed: 2018-03-06 15:15:50 UTC Type: Bug
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:    
Bug Blocks: 1439944, 1439945    
Attachments:
Description Flags
Skip clusters with invalid configuration none

Description Saif Ali 2017-03-28 20:47:29 UTC
Description of problem:
After CF upgraded to 5.7.1.3 from 5.7.0.17 the provider refresh fail with "undefined method `[]' for nil:NilClass"
Removing the provider, and re-added didn't make any difference. 

EVM.log:
[----] E, [2017-03-28T10:45:48.598813 #29777:107b13c] ERROR -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Refresher#refresh) EMS: [VMWare], id: [10000000000004] Unable to perform refresh for the following targets:
[----] E, [2017-03-28T10:45:48.598882 #29777:107b13c] ERROR -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Refresher#refresh)  --- ManageIQ::Providers::Vmware::InfraManager [VMWare] id [10000000000004]
[----] I, [2017-03-28T10:45:48.607182 #29777:107b13c]  INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Refresher#refresh) Refreshing all targets...Complete
[----] E, [2017-03-28T10:45:48.607367 #29777:107b13c] ERROR -- : MIQ(MiqQueue#deliver) Message id: [10000003734839], Error: [undefined method `[]' for nil:NilClass]
[----] E, [2017-03-28T10:45:48.607494 #29777:107b13c] ERROR -- : [EmsRefresh::Refreshers::EmsRefresherMixin::PartialRefreshError]: undefined method `[]' for nil:NilClass  Method:[rescue in deliver]
[----] E, [2017-03-28T10:45:48.607627 #29777:107b13c] ERROR -- : /var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:50:in `refresh'


Version-Release number of selected component (if applicable):
CF 5.7.1.3
VC 6.0.0, 4541947


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Adam Grare 2017-04-04 18:18:58 UTC
Interesting it looks like the config for one of the clusters is nil, refreshes were succeeding recently before so maybe a new cluster was added or got disconnected?  We should be skipping invalid clusters so I'll work that patch up and we should be able to figure out which cluster it is failing on.

Comment 3 Adam Grare 2017-04-04 18:40:07 UTC
Created attachment 1268729 [details]
Skip clusters with invalid configuration

Comment 5 CFME Bot 2017-04-06 19:53:34 UTC
New commit detected on ManageIQ/manageiq-providers-vmware/master:
https://github.com/ManageIQ/manageiq-providers-vmware/commit/0ba0091e56b6d1619a6cceb8faa75ac53ccf99dd

commit 0ba0091e56b6d1619a6cceb8faa75ac53ccf99dd
Author:     Adam Grare <agrare>
AuthorDate: Tue Apr 4 14:48:32 2017 -0400
Commit:     Adam Grare <agrare>
CommitDate: Tue Apr 4 14:48:32 2017 -0400

    Skip clusters with invalid configuration
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1436853

 app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb | 2 ++
 1 file changed, 2 insertions(+)