Bug 1170813 - scvmm EmsRefresh.save_hosts_inventory error ActiveRecord::StatementInvalid
Summary: scvmm EmsRefresh.save_hosts_inventory error ActiveRecord::StatementInvalid
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Insight
Version: 5.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: 5.4.0
Assignee: Bronagh Sorota
QA Contact: Milan Falešník
URL:
Whiteboard:
Depends On:
Blocks: 1173616 1178990
TreeView+ depends on / blocked
 
Reported: 2014-12-04 22:33 UTC by Josh Carter
Modified: 2019-03-22 07:27 UTC (History)
4 users (show)

Fixed In Version: 5.4.0.0.11
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1173616 1178990 (view as bug list)
Environment:
Last Closed: 2015-06-16 12:45:48 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Comment 3 Greg Blomquist 2014-12-05 04:21:01 UTC
The problem here is with the EmsRefresh::Parsers::Scvmm#identify_primary_ip method.

If the method is unable to find any IP addresses that are ":UsedForManagement", then it returns the entire array of all IP data for the host.

There may be a way to fix this at the customer site by simply making sure all hosts have an IP that is :UsedForManagement.  Unfortunately, I have no idea what that actually means in SCVMM.

The actual fix is to change the identify_primary_ip method to only return IP information if any is found.  Otherwise, return nil.  We just have to make sure that assigning no IP address to a host is OK.  I'm not positive it is, though.

Comment 5 Greg Blomquist 2014-12-11 15:22:47 UTC
The problem appears to be that when scvmm hosts do not have a Management IP selected.

The best we can probably do as a code fix is to add better logging for when we skip hosts and indicate that the host requires one of the IP addresses enabled as the Management IP.

This should also be documented as well, that CFME requires SCVMM Hosts to have a Management IP enabled.

Comment 6 CFME Bot 2015-01-17 02:31:14 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ae1641809e3ead7525c8f4e39ff8380021234255

commit ae1641809e3ead7525c8f4e39ff8380021234255
Author:     Bronagh Sorota <bsorota>
AuthorDate: Wed Oct 15 13:58:54 2014 -0400
Commit:     Bronagh Sorota <bsorota>
CommitDate: Fri Dec 19 13:37:04 2014 -0500

    Deals with NICs without any IPs or no mgmt IP
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1170813

 vmdb/app/models/ems_refresh/parsers/scvmm.rb | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

Comment 7 Milan Falešník 2015-03-05 15:22:07 UTC
Verified in 5.4.0.0.10, when I removed the management option in CVMM from the adapter, the host was retrieved without error. It had no IP address and when I enabled the management option back, it then retrieved the IP address.

Comment 10 errata-xmlrpc 2015-06-16 12:45:48 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


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