Project

General

Profile

Actions

Bug #15560

closed

Use APIv3 with oVirt 4

Added by Esa Varemo over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Compute resources - oVirt
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

After upgrading ovirt cluster to 4.0 foreman can no longer properly communicate with the engine.

GUI shows errors like this:

There was an error listing VMs: undefined method `+' for nil:NilClass

In the logs:


2016-07-01 13:27:44 [app] [I] Started GET "/compute_resources/1-ovirt" for 192.168.0.8 at 2016-07-01 13:27:44 +0300
2016-07-01 13:27:44 [app] [I] Processing by ComputeResourcesController#show as HTML
2016-07-01 13:27:44 [app] [I]   Parameters: {"id"=>"1-ovirt"}
2016-07-01 13:27:44 [app] [I] Deface: [WARNING] No :original defined for 'remove_compute_profiles_tab', you should change its definition to include:
 |  :original => 'aecbf94e43770bf29957263a987790f7873c4fd6'
2016-07-01 13:27:44 [app] [I] Deface: [WARNING] No :original defined for 'rename_virtual_machines_containers', you should change its definition to include:
 |  :original => 'adff190a5a6ab59b88f6cf9956f23cd53db53248'
2016-07-01 13:27:44 [app] [I]   Rendered compute_resources/show/_ovirt.html.erb (1.2ms)
2016-07-01 13:27:44 [app] [I]   Rendered compute_resources/show.html.erb within layouts/application (43.7ms)
2016-07-01 13:27:44 [app] [I]   Rendered layouts/_application_content.html.erb (0.8ms)
2016-07-01 13:27:44 [app] [I]   Rendered home/_user_dropdown.html.erb (2.8ms)
2016-07-01 13:27:44 [app] [I] Read fragment views/tabs_and_title_records-3 (0.4ms)
2016-07-01 13:27:44 [app] [I]   Rendered home/_topbar.html.erb (5.1ms)
2016-07-01 13:27:44 [app] [I]   Rendered layouts/base.html.erb (7.4ms)
2016-07-01 13:27:44 [app] [I] Completed 200 OK in 124ms (Views: 78.5ms | ActiveRecord: 12.2ms)
2016-07-01 13:27:45 [app] [I] Started GET "/compute_resources/1-ovirt/images" for 192.168.0.8 at 2016-07-01 13:27:45 +0300
2016-07-01 13:27:45 [app] [I] Started GET "/compute_resources/1-ovirt/vms" for 192.168.0.8 at 2016-07-01 13:27:45 +0300
2016-07-01 13:27:45 [app] [I] Processing by ImagesController#index as HTML
2016-07-01 13:27:45 [app] [I]   Parameters: {"compute_resource_id"=>"1-ovirt"}
2016-07-01 13:27:45 [app] [I] Processing by ComputeResourcesVmsController#index as HTML
2016-07-01 13:27:45 [app] [I]   Parameters: {"compute_resource_id"=>"1-ovirt"}
2016-07-01 13:27:45 [app] [I]   Rendered images/index.html.erb within layouts/application (12.8ms)
2016-07-01 13:27:45 [app] [I]   Rendered layouts/_application_content.html.erb (0.7ms)
2016-07-01 13:27:45 [app] [I]   Rendered home/_user_dropdown.html.erb (2.7ms)
2016-07-01 13:27:45 [app] [I] Read fragment views/tabs_and_title_records-3 (0.3ms)
2016-07-01 13:27:45 [app] [I]   Rendered home/_topbar.html.erb (4.6ms)
2016-07-01 13:27:45 [app] [I]   Rendered layouts/base.html.erb (6.8ms)
2016-07-01 13:27:45 [app] [I] Completed 200 OK in 57ms (Views: 20.6ms | ActiveRecord: 7.4ms)
2016-07-01 13:27:45 [app] [W] Error has occurred while listing VMs on ovirt (oVirt)
 | NoMethodError: undefined method `+' for nil:NilClass
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/ovirt/base_object.rb:13:in `parse_version'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/ovirt/datacenter.rb:21:in `block in parse_xml_attributes!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:187:in `block in each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in `upto'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in `each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/ovirt/datacenter.rb:20:in `collect'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/ovirt/datacenter.rb:20:in `parse_xml_attributes!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/ovirt/datacenter.rb:8:in `initialize'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/client/datacenter_api.rb:16:in `new'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/client/datacenter_api.rb:16:in `block in datacenters'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:187:in `block in each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in `upto'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in `each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/client/datacenter_api.rb:15:in `collect'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/client/datacenter_api.rb:15:in `datacenters'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-1.37.0/lib/fog/ovirt/requests/compute/datacenters.rb:6:in `datacenters'
 | /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:262:in `client'
 | /usr/share/foreman/app/models/compute_resource.rb:136:in `vms'
 | /usr/share/foreman/app/controllers/compute_resources_vms_controller.rb:4:in `index'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:189:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rendering.rb:10:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `public_send'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `public_send'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `run_callbacks'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/callbacks.rb:19:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rescue.rb:29:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications.rb:159:in `block in instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications.rb:159:in `instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:136:in `process'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionview-4.1.5/lib/action_view/rendering.rb:30:in `process'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal.rb:196:in `dispatch'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal.rb:232:in `block in action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:82:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:50:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:71:in `block in call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:59:in `each'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:59:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:678:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.6/lib/apipie/static_dispatcher.rb:65:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.6/lib/apipie/extractor/recorder.rb:132:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.6/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
 | /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/flash.rb:254:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/cookies.rb:560:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/query_cache.rb:36:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:82:in `run_callbacks'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/rack/logger.rb:38:in `call_app'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/rack/logger.rb:22:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/request_id.rb:21:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/engine.rb:514:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/application.rb:144:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/railtie.rb:194:in `public_send'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/railtie.rb:194:in `method_missing'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
 | /usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
 | /usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
 | /usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
 | /usr/share/passenger/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2016-07-01 13:27:45 [app] [I]   Rendered compute_resources_vms/_error.html.erb (2.0ms)
2016-07-01 13:27:45 [app] [I] Completed 200 OK in 328ms (Views: 3.7ms | ActiveRecord: 7.5ms)

Related issues 4 (0 open4 closed)

Related to Foreman - Bug #15578: "404 Resource Not Found" on oVirt 4.0Closed07/05/2016Actions
Related to Foreman - Bug #15738: Error undefined method `text' for nil:NilClass Create VMResolved07/19/2016Actions
Related to Foreman - Bug #20191: oVirt 4.2 is not supportedDuplicate07/03/2017Actions
Has duplicate Foreman - Bug #16094: Error integrate Foreman on OvirtDuplicate08/12/2016Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

https://github.com/abenari/rbovirt/commit/ccec8ac6f26adf6b4cac29a38e0d30f9bc40299e should fix this in rbovirt, but it is not yet released. When released and updated in Foreman, it will use the v3 API.

Actions #2

Updated by Esa Varemo over 8 years ago

Glad to know it will be fixed. After talkin with jhernand on IRC it seems that this also depends on a bug in ovirt 4.0.0 (https://bugzilla.redhat.com/1346752). Fix will be in 4.0.1.

Actions #3

Updated by Dominic Cleal over 8 years ago

  • Related to Bug #15578: "404 Resource Not Found" on oVirt 4.0 added
Actions #4

Updated by Anonymous over 8 years ago

  • Related to Bug #15738: Error undefined method `text' for nil:NilClass Create VM added
Actions #5

Updated by Clesio Santos over 8 years ago

There is a fix that can be used? I´m test the fix in rbovirt as Dominic tell, but not fix!
Well i´m not restart foreman service after change rbovirt.

tks

Actions #6

Updated by Esa Varemo over 8 years ago

Clesio Santos wrote:.

There is a fix that can be used? I´m test the fix in rbovirt as Dominic tell, but not fix!
Well i´m not restart foreman service after change rbovirt.

tks

What I did as a temporary workaround:

Changed the URL in foreman to <engine-host>/ovirt-engine/api/v3
This will force API v3 which is essentially what the above fix in rbovirt does.

Then I had to do a small modification to rbovirt to go around what I've understood is a bug in ovirt that should be fixed in a nearby release (unless it already is?).

As a temporary thing I just modified `/opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/ovirt/volume.rb` (which is not really recommended in the long run)

# diff -Naur volume.rb.original /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-

0.0.37/lib/ovirt/volume.rb
--- volume.rb.original  2016-07-01 21:12:57.956079783 +0300
+++ /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/ovirt/volume.rb     2016-07-01 21:13:17.096267195 +0300
@@ -50,8 +50,8 @@
      @storage_domain = ((xml/'storage_domains/storage_domain').first[:id] rescue nil)
      @size = (xml/'size').first.text
      @disk_type = ((xml/'type').first.text rescue nil)
-     @bootable = (xml/'bootable').first.text
-     @interface = (xml/'interface').first.text
+     @bootable = ((xml/'bootable').first.text rescue nil)
+     @interface = ((xml/'interface').first.text rescue nil)
      @format = ((xml/'format').first.text rescue nil)
      @sparse = ((xml/'sparse').first.text rescue nil)
      @status = ((xml/'status/state').first.text rescue nil)
Actions #7

Updated by Clesio Santos over 8 years ago

Esa Varemo wrote:

Clesio Santos wrote:.

There is a fix that can be used? I´m test the fix in rbovirt as Dominic tell, but not fix!
Well i´m not restart foreman service after change rbovirt.

tks

What I did as a temporary workaround:

Changed the URL in foreman to <engine-host>/ovirt-engine/api/v3
This will force API v3 which is essentially what the above fix in rbovirt does.

Then I had to do a small modification to rbovirt to go around what I've understood is a bug in ovirt that should be fixed in a nearby release (unless it already is?).

As a temporary thing I just modified `/opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/ovirt/volume.rb` (which is not really recommended in the long run)

[...]

Esa i change the file volume.rb but not working.
some informations about my foreman:

Foreman version 1.12
rbovirt-0.1.1

modify:
  1. @bootable = (xml/'bootable').first.text
  2. @interface = (xml/'interface').first.text
    @bootable = ((xml/'bootable').first.text rescue nil)
    @interface = ((xml/'interface').first.text rescue nil)

after modify the error change by:
Failed to save: Failed to create a compute Minc_Cloud (oVirt) instance ovirt-validation.minc.cloud.srv.produ: 404 Resource Not Found

Actions #8

Updated by Esa Varemo over 8 years ago

Clesio Santos wrote:

after modify the error change by:
Failed to save: Failed to create a compute Minc_Cloud (oVirt) instance ovirt-validation.minc.cloud.srv.produ: 404 Resource Not Found

I don't think I've encountered such an error, sorry

Actions #9

Updated by Ohad Levy over 8 years ago

workaround for now, in the URL enter:

<engine-host>/ovirt-engine/api/v3

Actions #10

Updated by Juan Hernández over 8 years ago

The oVirt bug mentioned by Clesio is this one:

Api v3 error return null in disk search
https://bugzilla.redhat.com/1358860

It will be fixed in release 4.0.2 of oVirt.

In addition, in order to avoid the workaround described in the previous comment, the rbovirt gem has been modified so that it selects version 3 of the oVirt API automatically:

Explicitly use version 3 of the API
https://github.com/abenari/rbovirt/pull/109

I'd suggest to make a new release of that gem, and modify Foreman to use it.

Actions #11

Updated by Clesio Santos over 8 years ago

Juan Hernández wrote:

The oVirt bug mentioned by Clesio is this one:

Api v3 error return null in disk search
https://bugzilla.redhat.com/1358860

It will be fixed in release 4.0.2 of oVirt.

In addition, in order to avoid the workaround described in the previous comment, the rbovirt gem has been modified so that it selects version 3 of the oVirt API automatically:

Explicitly use version 3 of the API
https://github.com/abenari/rbovirt/pull/109

I'd suggest to make a new release of that gem, and modify Foreman to use it.

Juan,

thank so much!!! this problems is closed.

the version 4.0.2.1-1.el7.centos fix the bug <disks>

but now show me error 404 Resource not Found

Actions #12

Updated by Dominic Cleal about 8 years ago

  • Has duplicate Bug #16094: Error integrate Foreman on Ovirt added
Actions #13

Updated by Lukas Zapletal about 8 years ago

  • Status changed from New to Closed
  • Translation missing: en.field_release set to 175

Hello, the fix for bootable/interface is included in rbovirt 0.1.2 and it should be part of our nightlies and the upcoming 1.12.2 release. Thanks for report.

Actions #14

Updated by Lukas Zapletal almost 8 years ago

  • Bugzilla link set to 1393928
Actions #15

Updated by Lukas Zapletal over 7 years ago

  • Related to Bug #20191: oVirt 4.2 is not supported added
Actions #16

Updated by Ivan Necas over 7 years ago

  • Subject changed from oVirt 4.0 API is not supported to Use APIv3 with oVirt 4

I've renamed the subject of the issue, as it was misleading, as the fix for it was using the v3 api provided by oVirt 4, the APIv4 issue is tracked in #19568

Actions

Also available in: Atom PDF