Bug #4346

oVirt Compute Resource needs to be updated for rbovirt >0.0.21

Added by Anonymous over 6 years ago. Updated about 2 years ago.

Compute resources
Target version:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:


Beginning with oVirt 3.4.0 beta 2 the CR connection does not work anymore, because the API changed (see Red Hat bugzilla #1038053). got it working again for us.

However, after updating rbovirt to 0.0.22, creating a new VM is leading to

Failed to create a compute XXX-VM (oVirt) instance undefined method `reload' for #<Array:0x00000008ada068>
/usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:243:in `create_interfaces'
/usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:115:in `create_vm'
/usr/share/foreman/app/models/concerns/orchestration/compute.rb:59:in `setCompute'
/usr/share/foreman/app/models/concerns/orchestration.rb:148:in `execute'
/usr/share/foreman/app/models/concerns/orchestration.rb:88:in `block in process'
/usr/share/foreman/app/models/concerns/orchestration.rb:80:in `each'
/usr/share/foreman/app/models/concerns/orchestration.rb:80:in `process'
/usr/share/foreman/app/models/concerns/orchestration.rb:18:in `on_save'

Checking rbovirt 0.0.23 with oVirt 3.3 is leading to the same backtrace.

Related issues

Related to Foreman - Bug #4684: "undefined method `text' for nil:NilClass" error when trying to add ovirt 3.4 compute resourceResolved2014-03-18
Blocked by Foreman - Tracker #4582: Upgrade to fog > 1.20Closed


#1 Updated by Anonymous over 6 years ago

I propose pinning rbovirt to 0.0.21 for Foreman 1.4, so at least oVirt 3.3 is in working state.

#2 Updated by Dominic Cleal over 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Amos Benari

#3 Updated by Andrew Lau over 6 years ago

Post help from Michael on the IRC channel, my findings are as follows:

Upgrading to rbovirt 0.0.23 will fix the issue with the compute resource but will then break the ability to edit VMs with this error:

undefined method `_delete' for #

Full Trace:

undefined method `_delete' for #<OVIRT::Interface:0x007f8ed0f43920>
app/views/compute_resources_vms/form/ovirt/_network.html.erb:3:in `_app_views_compute_resources_vms_form_ovirt__network_html_erb__3130231690440341772_75649300'
app/views/compute_resources_vms/form/_ovirt.html.erb:28:in `block (2 levels) in _app_views_compute_resources_vms_form__ovirt_html_erb___280622726615454600_74649360'
app/views/compute_resources_vms/form/_ovirt.html.erb:27:in `block in _app_views_compute_resources_vms_form__ovirt_html_erb___280622726615454600_74649360'
app/views/compute_resources_vms/form/_ovirt.html.erb:26:in `_app_views_compute_resources_vms_form__ovirt_html_erb___280622726615454600_74649360'
app/views/hosts/_compute.html.erb:5:in `block in _app_views_hosts__compute_html_erb___472968674354032972_74353460'
app/views/hosts/_compute.html.erb:1:in `_app_views_hosts__compute_html_erb___472968674354032972_74353460'
app/views/hosts/_unattended.html.erb:2:in `_app_views_hosts__unattended_html_erb__1413311731205760309_74234520'
app/views/hosts/_form.html.erb:91:in `block (2 levels) in _app_views_hosts__form_html_erb__3342426395099232991_70125686802080'
app/helpers/layout_helper.rb:218:in `form_for'
app/views/hosts/_form.html.erb:7:in `block in _app_views_hosts__form_html_erb__3342426395099232991_70125686802080'
app/models/taxonomy.rb:54:in `block (2 levels) in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:143:in `as_location'
app/models/taxonomy.rb:53:in `block in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:108:in `as_org'
app/models/taxonomy.rb:52:in `as_taxonomy'
app/views/hosts/_form.html.erb:5:in `_app_views_hosts__form_html_erb__3342426395099232991_70125686802080'
app/views/hosts/edit.html.erb:7:in `_app_views_hosts_edit_html_erb__3489572736405311226_70125686758820'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

Reverting back to rbovirt 0.0.21 and applying the commit solved the issue. I'm using oVirt nightly, but the build is around the same date as 3.4.0 beta 2

#4 Updated by Dominic Cleal over 6 years ago

#5 Updated by Dominic Cleal over 6 years ago

  • Status changed from Assigned to Pending

abenari: "@domcleal I have already fixed in fog, once fog gets a new release, we will be able to bump both rbovirt and fog versions and this issue will be solved too." it appears.

#6 Updated by Anonymous over 6 years ago

  • Related to Bug #4684: "undefined method `text' for nil:NilClass" error when trying to add ovirt 3.4 compute resource added

#7 Updated by Dominic Cleal over 6 years ago

  • Status changed from Pending to Closed
  • Target version set to 1.9.0
  • % Done changed from 0 to 100
  • Legacy Backlogs Release (now unused) set to 4

We now depend on rbovirt 0.0.24 in Foreman 1.5/nightlies, so this should now be fixed. Please report if you find otherwise.

#8 Updated by Dominic Cleal about 6 years ago

I'm releasing a 0.0.21-3 package into Foreman 1.4.4 which contains the patch mentioned in the original description, to help with oVirt 3.4 compat.

Also available in: Atom PDF