Bug 1213939

Summary: undefined method `[]' for nil:NilClass when SCVMM added and refreshed.
Product: Red Hat CloudForms Management Engine Reporter: Milan Falešník <mfalesni>
Component: InsightAssignee: Bronagh Sorota <bsorota>
Status: CLOSED ERRATA QA Contact: Milan Falešník <mfalesni>
Severity: high Docs Contact:
Priority: high    
Version: 5.4.0CC: bsorota, cpelland, dclarizi, gblomqui, tcarlin
Target Milestone: GA   
Target Release: 5.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-16 12:59:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Excerpt from evm.log none

Description Milan Falešník 2015-04-21 15:08:13 UTC
Created attachment 1016939 [details]
Excerpt from evm.log

Description of problem:
When adding our SCVMM environment, this error appears in logs and the provider is prevented from loading the inventory by it.

Version-Release number of selected component (if applicable):
latest upstream nightly + 5.3.4.2

How reproducible:
always but not sure why does that happen so it might need something in the provider set specifically for this to happen.

Steps to Reproduce:
1. Add a SCVMM provider
2. Refresh
3. Wait for inventory to appear

Actual results:
Nothing happens, upstream also shows the error in the summary, 5.3 does not have the error field so it looks like nothing's happening

Expected results:
Provider is refreshed and inventory retrieved

Additional info:

Comment 2 CFME Bot 2015-04-28 14:35:46 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/8ecb11ea2e7a46a7c6e45ae9265d2b4688739d61

commit 8ecb11ea2e7a46a7c6e45ae9265d2b4688739d61
Author:     Bronagh Sorota <bsorota>
AuthorDate: Wed Apr 22 11:27:26 2015 -0400
Commit:     Bronagh Sorota <bsorota>
CommitDate: Fri Apr 24 16:24:25 2015 -0400

    Query the LastRestoredCheckpointID instead of the LastRestoredVMCheckpoint
    
    The LastRestoredVMCheckpoint has been used to determine if a snapshot is
    current. However it can be nil if no snapshots were ever taken for a VM and
    can therefore can cause the SCVMM parser to bomb out.
    Instead, we should query the LastRestoredCheckpointID to determine if a
    snapshot is current which is set to the VM ID if no snapshots are present.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1213939

 vmdb/app/models/ems_refresh/parsers/scvmm.rb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comment 3 Bronagh Sorota 2015-05-01 13:36:46 UTC
*** Bug 1217476 has been marked as a duplicate of this bug. ***

Comment 5 Milan Falešník 2015-05-07 08:25:58 UTC
Verified in 5.4.0.0.25 against the same SCVMM provider as used for bug report. No such error appeared.

Comment 7 errata-xmlrpc 2015-06-16 12:59: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://rhn.redhat.com/errata/RHBA-2015-1100.html