Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1234871 - SCVMM provider refresh fails where VM disks are not present
SCVMM provider refresh fails where VM disks are not present
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
5.4.0
Unspecified Unspecified
high Severity high
: GA
: 5.5.0
Assigned To: Bronagh Sorota
Milan Falešník
: ZStream
Depends On:
Blocks: 1241656
  Show dependency treegraph
 
Reported: 2015-06-23 08:20 EDT by ncatling
Modified: 2015-12-08 08:18 EST (History)
8 users (show)

See Also:
Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
The previous version of CloudForms Management Engine would report an undefined method error when discovering virtual machines on a Microsoft system center virtual machine manager (SCVMM) provider, if it found a disk-less virtual machine. This bug was a result of the virtual machine storage discovery code always expecting virtual machines to have disks. This bug was fixed by changing the code to handle the case of disk-less virtual machines gracefully. Virtual machine discovery on SCVMM providers completes successfully in the new version of CloudForms Management Engine.
Story Points: ---
Clone Of:
: 1241656 (view as bug list)
Environment:
Last Closed: 2015-12-08 08:18:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 12:58:09 EST

  None (edit)
Description ncatling 2015-06-23 08:20:03 EDT
Description of problem:
SCVMM provider discovery fails where VM disks are not present, producing the following error:

ERROR -- : [NoMethodError]: undefined method `collect' for nil:NilClass  Method:[rescue in block in refresh]
ERROR -- : /var/www/miq/vmdb/app/models/ems_refresh/parsers/scvmm.rb:443:in `process_vm_storages

Version-Release number of selected component (if applicable):
CFME 5.4.0
SCVMM SP1

How reproducible:
Discover SCVMM provider where VMs exist with no disk/s.

Steps to Reproduce:
1.
2.
3.

Actual results:
Discover fails, producing the error above.

Expected results:
Discovery completes.

Additional info:
Comment 2 ncatling 2015-06-24 06:51:37 EDT
Fix is to amend process_vm_storages procedure in scvmm.rb as follows:

    def process_vm_storages(properties)
      return if properties[:VirtualHardDisks].nil?
      
      properties[:VirtualHardDisks].collect do |vhd|
        @data_index.fetch_path(:storages, vhd[:Props][:HostVolumeId])
      end.compact.uniq
    end
Comment 3 Oleg Barenboim 2015-07-08 10:57:46 EDT
Pull Request: https://github.com/ManageIQ/manageiq/pull/3388
Comment 4 CFME Bot 2015-07-09 11:47:18 EDT
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/bf119d024009ebacebc16cc5ff7ed92d9ccdf065

commit bf119d024009ebacebc16cc5ff7ed92d9ccdf065
Author:     Bronagh Sorota <bsorota@redhat.com>
AuthorDate: Tue Jul 7 15:46:58 2015 -0400
Commit:     Bronagh Sorota <bsorota@redhat.com>
CommitDate: Tue Jul 7 15:46:58 2015 -0400

    returns if no disks are present on the VM
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1234871

 app/models/ems_refresh/parsers/scvmm.rb | 2 ++
 1 file changed, 2 insertions(+)
Comment 5 CFME Bot 2015-07-15 15:59:33 EDT
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=14de85df7d8cf0377ac692bc29b5fb3590730287

commit 14de85df7d8cf0377ac692bc29b5fb3590730287
Author:     Bronagh Sorota <bsorota@redhat.com>
AuthorDate: Tue Jul 7 15:46:58 2015 -0400
Commit:     Bronagh Sorota <bsorota@redhat.com>
CommitDate: Wed Jul 15 12:13:21 2015 -0400

    returns if no disks are present on the VM
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1234871

 vmdb/app/models/ems_refresh/parsers/scvmm.rb | 2 ++
 1 file changed, 2 insertions(+)
Comment 6 Milan Falešník 2015-10-26 05:38:57 EDT
Verified in 5.5.0.7.
Comment 8 errata-xmlrpc 2015-12-08 08:18:00 EST
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-2015:2551

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