Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1412573 - Refresh of a template without OS configured fails
Refresh of a template without OS configured fails
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
5.7.0
Unspecified Unspecified
high Severity high
: GA
: 5.8.0
Assigned To: Moti Asayag
Ilanit Stein
rhev
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-12 05:38 EST by Moti Asayag
Modified: 2017-05-31 10:32 EDT (History)
9 users (show)

See Also:
Fixed In Version: 5.8.0.2
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-31 10:32:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM


Attachments (Terms of Use)


External Trackers
Tracker 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 14:16:03 EDT

  None (edit)
Description Moti Asayag 2017-01-12 05:38:11 EST
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 05:49:50 EST
PR for ovirt gem:

https://github.com/ManageIQ/ovirt/pull/76
Comment 3 CFME Bot 2017-01-12 10:12:02 EST
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 09:33:01 EST
Moving back to ON_DEV.  Once the new version is released, please move to POST.  Thanks!
Comment 11 errata-xmlrpc 2017-05-31 10:32:49 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.

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.