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):
Steps to Reproduce:
1. Create a template without specifying any OS info on rhevm provider
2. Refresh the rhevm provider on CFME side.
refresh process fails.
refresh process ends successfully with a template
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:  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
PR for ovirt gem:
New commit detected on ManageIQ/ovirt/master:
Author: Moti Asayag <email@example.com>
AuthorDate: Thu Jan 12 12:15:16 2017 +0200
Commit: Moti Asayag <firstname.lastname@example.org>
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.
lib/ovirt/template.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Moving back to ON_DEV. Once the new version is released, please move to POST. Thanks!
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.