Bug 1412573 - Refresh of a template without OS configured fails
Summary: Refresh of a template without OS configured fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.0
Assignee: Moti Asayag
QA Contact: Angelina Nikiforova
URL:
Whiteboard: rhev
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-12 10:38 UTC by Moti Asayag
Modified: 2019-05-28 11:35 UTC (History)
9 users (show)

Fixed In Version: 5.8.0.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-31 14:32:49 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1367 normal SHIPPED_LIVE Moderate: CFME 5.8.0 security, bug, and enhancement update 2017-05-31 18:16:03 UTC

Description Moti Asayag 2017-01-12 10:38:11 UTC
Description of problem:
When trying to perform a full refresh and one of the template has no OS configured, the entire refresh process fails.

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

How reproducible:
100%

Steps to Reproduce:
1. Create a template without specifying any OS info on rhevm provider
2. Refresh the rhevm provider on CFME side.

Actual results:
refresh process fails.

Expected results:
refresh process ends successfully with a template 

Additional info:

Exception from evm.log:
[----] E, [2017-01-12T09:53:31.966026 #12638:405128] ERROR -- : MIQ(ManageIQ::Providers::Redhat::InfraManager::Refresh::Strategies::Api4#refresh) EMS: [brq-dev.rhev.lab
.eng.brq.redhat.com], id: [12] Refresh failed
[----] E, [2017-01-12T09:53:31.969775 #12638:405128] ERROR -- : [NoMethodError]: undefined method `<<' for nil:NilClass  Method:[rescue in block in refresh]
[----] E, [2017-01-12T09:53:31.969853 #12638:405128] ERROR -- : /home/masayag/.rvm/gems/ruby-2.3.0/gems/ovirt-0.14.0/lib/ovirt/template.rb:35:in `block in parse_node_ex
tended'

Comment 2 Moti Asayag 2017-01-12 10:49:50 UTC
PR for ovirt gem:

https://github.com/ManageIQ/ovirt/pull/76

Comment 3 CFME Bot 2017-01-12 15:12:02 UTC
New commit detected on ManageIQ/ovirt/master:
https://github.com/ManageIQ/ovirt/commit/4f6dd24042ed07771399c4744fe3d06dea010966

commit 4f6dd24042ed07771399c4744fe3d06dea010966
Author:     Moti Asayag <masayag@redhat.com>
AuthorDate: Thu Jan 12 12:15:16 2017 +0200
Commit:     Moti Asayag <masayag@redhat.com>
CommitDate: Thu Jan 12 12:40:36 2017 +0200

    Support templates without OS
    
    In case of a template without OS, the code to parse the OS fails:
    hash[:os][:boot_order] = boot_order = []
    
    The left part 'hash[:os][:boot_order]' fails since hash[:os]
    is nil. However, the entire statement ends without an error due to
    the assignment, but the 'boot_order' is declared without being initialized
    to [], therefore its value is nil.
    
    The parsing eventually fails with nil error when trying to add a value to
    boot_order using << operator.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1412573

 lib/ovirt/template.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comment 6 Satoe Imaishi 2017-02-06 14:33:01 UTC
Moving back to ON_DEV.  Once the new version is released, please move to POST.  Thanks!

Comment 11 errata-xmlrpc 2017-05-31 14:32:49 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://access.redhat.com/errata/RHSA-2017:1367


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