Description of problem: ================================ Attempting to manage a RHEV 3.6.2 environment, I get the following error in evm.log which kills the initial ems_refresh thereby discovering nothing. We tested a few weeks back and this was originally working, not sure the version though. Install date was ~Dec15 and testing on it looked good so maybe 3.6.1? [----] E, [2016-02-07T23:30:53.953117 #24481:62b998] ERROR -- : /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/vm.rb:277:in `parse_xml' /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/base.rb:7:in `create_from_xml' /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/service.rb:22:in `xml_to_object' /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/service.rb:120:in `block in standard_collection' /opt/rh/rh-ruby22/root/usr/share/gems/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:187:in `block in each' /opt/rh/rh-ruby22/root/usr/share/gems/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in `upto' /opt/rh/rh-ruby22/root/usr/share/gems/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in `each' /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/service.rb:120:in `collect' /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/service.rb:120:in `standard_collection' /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/inventory.rb:100:in `standard_collection' /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/inventory.rb:72:in `vms' /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/inventory.rb:143:in `block in collect_primary_items' /opt/rh/cfme-gemset/gems/parallel-0.5.21/lib/parallel.rb:296:in `call' /opt/rh/cfme-gemset/gems/parallel-0.5.21/lib/parallel.rb:296:in `call_with_index' /opt/rh/cfme-gemset/gems/parallel-0.5.21/lib/parallel.rb:135:in `block (2 levels) in work_in_threads' /opt/rh/cfme-gemset/gems/parallel-0.5.21/lib/parallel.rb:125:in `loop' /opt/rh/cfme-gemset/gems/parallel-0.5.21/lib/parallel.rb:125:in `block in work_in_threads' /opt/rh/cfme-gemset/gems/parallel-0.5.21/lib/parallel.rb:14:in `block (2 levels) in in_threads' [----] E, [2016-02-07T23:30:53.953175 #24481:62b998] ERROR -- : MIQ(ManageIQ::Providers::Redhat::InfraManager::Refresher#refresh) EMS: [brno-rhev], id: [23000000000001] Unable to perform refresh for the following targets: Version-Release number of selected component (if applicable): CFME 5.5.2.4 How reproducible: ================== 100% Steps to Reproduce: 1. Add rhevm 3.6.2 env to CFME 2. 3. Additional info:
Oved, can your team take a look at this? I wonder if something changed in the XML format recently from the rhevm API.
This is caused by the bug 1301992, which will be fixed in 3.6.3. As a workaround you can apply the following change to the vm.rb file: -- /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/vm.rb 2016-01-26 15:32:22.436038845 +0100 +++ /opt/rh/cfme-gemset/gems/ovirt-0.7.1/lib/ovirt/vm.rb.new 2016-01-26 15:32:15.548038845 +0100 @@ -274,6 +274,8 @@ parse_first_node(node, :placement_policy, hash, :node => [:affinity]) + hash[:placement_policy] = {} if hash[:placement_policy].nil? + parse_first_node_with_hash(node, 'placement_policy/host', hash[:placement_policy][:host] = {}, :attribute => [:id]) Se also the following upstream issue: [Capablanca] - Refresh relationships fails for oVirt (RHEV) provider https://github.com/ManageIQ/manageiq/issues/5741
Please test with latest 3.6.3 build of RHEV.
Verified in 5.6.0.4-beta2.3.20160421172650_719e256 + RHEVM 3.6.5. I was able to add rhevm 3.6.3 to providers and refresh it to get data about hosts/vms etc..
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/RHBA-2016:1348