Bug 1298325 - SCVMM Provider refresh error refresh_parser.rb:324:in `process_snapshots'
SCVMM Provider refresh error refresh_parser.rb:324:in `process_snapshots'
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
All All
high Severity high
: GA
: 5.6.0
Assigned To: Bronagh Sorota
Jeff Teehan
: ZStream
Depends On:
Blocks: 1331093
  Show dependency treegraph
Reported: 2016-01-13 14:10 EST by Josh Carter
Modified: 2016-10-03 12:16 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1331093 (view as bug list)
Last Closed: 2016-06-29 11:29:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Unknown

Attachments (Terms of Use)

  None (edit)
Description Josh Carter 2016-01-13 14:10:02 EST
Description of problem:

The following error gets created in the web UI following the SCVMM provider refresh:

undefined method `each' for nil:NilClass

[----] E, [2016-01-13T16:14:15.454469 #3064:6c398c] ERROR -- : MIQ(ManageIQ::Providers::Microsoft::InfraManager::Refresher#refresh) EMS: [SCVMM], id: [1000000000001] Refresh failed
[----] E, [2016-01-13T16:14:15.454712 #3064:6c398c] ERROR -- : [NoMethodError]: undefined method `each' for nil:NilClass  Method:[rescue in block in refresh]
[----] E, [2016-01-13T16:14:15.454828 #3064:6c398c] ERROR -- : /var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb:324:in `process_snapshots'
/var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb:194:in `parse_vm'
/var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb:64:in `block in get_vms'
/var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb:601:in `block in process_collection'
/var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb:600:in `each'
/var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb:600:in `process_collection'
/var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb:64:in `get_vms'
/var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb:31:in `ems_inv_to_hashes'
/var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb:7:in `ems_inv_to_hashes'
/var/www/miq/vmdb/app/models/manageiq/providers/microsoft/infra_manager/refresher.rb:10:in `parse_inventory'

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

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
Comment 6 Bronagh Sorota 2016-01-25 12:26:19 EST
i have a theoretical explanation for this error which can be proven or disproven by testing on a SCVMM SP1 environment first. Jeff, can you help with this?
Comment 7 Jeff Teehan 2016-01-25 23:19:54 EST
Absolutely.  As I said to dajo, everything seems to working fine on our environment.  I'm still trying to figure out how to break it.
Comment 8 Jeff Teehan 2016-01-26 00:18:31 EST
I can't reproduce it.

I'm going to need some more info.  I routine check this provider and it always works.  I put a snapshot on everything and it still works.  I keep the latest Rollup Update installed.  Perhaps the customer is running and older version.

As far as whether the older SCVMM SP1 is supported or not, well, I support this platform.  I've always kept it up to date and it works just fine.  I'm going to need more info.

Please make sure the customer is using the latest version.  I've provided info at https://mojo.redhat.com/docs/DOC-1044058

I don't know what else to do.
Comment 10 Felix Dewaleyne 2016-01-29 10:53:28 EST
environment affected :

OS Version of VMM Server: 6.2 (Windows Server 2012)
3.1.6109.0 System Center 2012 SP1 Update Rollup 11
Comment 12 Bronagh Sorota 2016-01-29 11:14:34 EST
Yes, that would be a good next step. 
Jeff, can you do apply the rollups?
Comment 13 Jeff Teehan 2016-01-31 17:42:45 EST
I installed the requested version, verified it, and created a few more checkpoints both from SCVMM and from Hyper-V  Still seems to still be working.  Kind of wish it wasn't.
Comment 14 Jeff Teehan 2016-01-31 17:44:52 EST
I updated the mojo page as well.
Comment 19 Jeff Teehan 2016-02-23 12:03:05 EST
I responded twice with the same answer, which is I cannot reproduce it.  I have added all kinds of snapshots to no avail.  I don't know what else to try.
Comment 24 Bronagh Sorota 2016-05-03 09:57:07 EDT
Felix / Dave - I have no further suggestions.
The error indicates that we are trying to read the VMCheckpoints property from the VM but it is either not present or it has a NIL value. This is my best guess since none of us can reproduce it. I have made a PR to fix this.
Comment 25 CFME Bot 2016-05-19 07:45:46 EDT
New commit detected on ManageIQ/manageiq/master:

commit 414ec3f2bb98b696231ab4a89a6afbd3b1d279a0
Author:     Bronagh Sorota <bsorota@redhat.com>
AuthorDate: Tue Apr 26 13:51:32 2016 -0400
Commit:     Bronagh Sorota <bsorota@redhat.com>
CommitDate: Wed May 18 12:48:09 2016 -0400

    Return empty array if VMCheckpoints is NIL.

 .../manageiq/providers/microsoft/infra_manager/refresh_parser.rb    | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 26 Jeff Teehan 2016-06-16 14:49:03 EDT
I checked again with the new fix.  Everything continues to work fine and I've gone to extreme measures with checkpoints.  I even put the snapshots on a drive SCVMM can't see and it still worked fine.

Perhaps the checkpoint is just coincidental to another issue.  This new bug produces a very similar error - https://bugzilla.redhat.com/show_bug.cgi?id=1347406

It's not the checkpoints unless the VM is simply corrupt.  I've tried everything on all versions of SCVMM and Windows VMs.   Please reopen it if you find additional information.

Moving to Verified using as there was a code change.
Comment 28 errata-xmlrpc 2016-06-29 11:29:18 EDT
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.


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