Project

General

Profile

Bug #1639

Trying to edit a host that was provisioned as a Libvirt VM results in Oops

Added by Andreas Ntaflos about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
VM management
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Clicking "Edit" on a host that was provisioned as a virtual machine (with Libvirt 0.9.8 as a compute resource) results in the following "Oops":

NoMethodError
undefined method `[]' for nil:NilClass
app/helpers/lookup_keys_helper.rb:21:in `new_child_fields_template'
app/helpers/lookup_keys_helper.rb:20:in `new_child_fields_template'
app/views/compute_resources/vms/form/_libvirt.html.erb:20:in `_app_views_compute_resources_vms_form__libvirt_html_erb___2047140852_70269412877280_7325356'
app/views/hosts/_compute.html.erb:3:in `_app_views_hosts__compute_html_erb__883533051_70269412924000_6718156'
app/views/hosts/_compute.html.erb:1:in `_app_views_hosts__compute_html_erb__883533051_70269412924000_6718156'
app/views/hosts/_unattended.html.erb:6:in `_app_views_hosts__unattended_html_erb___1144187453_70269412982880_319468'
app/views/hosts/_form.html.erb:52:in `_app_views_hosts__form_html_erb___241456516_70269412627960_1228030'
app/helpers/layout_helper.rb:130:in `form_for'
app/views/hosts/_form.html.erb:3:in `_app_views_hosts__form_html_erb___241456516_70269412627960_1228030'
app/views/hosts/edit.html.erb:7:in `_app_views_hosts_edit_html_erb___1445452589_70269412663100_0'

This is with Foreman 0.5-nightly-ba71c565 on Ubuntu 12.04. Libvirt is 0.9.8.

bondev08.xml bondev08.xml 2.16 KB VM XML dump Andreas Ntaflos, 05/19/2012 05:36 PM
list_volumes.rb.patch list_volumes.rb.patch 364 Bytes Andreas Ntaflos, 06/18/2012 05:14 PM

History

#1 Updated by Ohad Levy about 7 years ago

just to be on the safe side, can you also attach your vm xml dump?

#2 Updated by Andreas Ntaflos about 7 years ago

Attaching VM XML dump.

#3 Updated by Andreas Ntaflos almost 7 years ago

The problem root seems to be that our Libvirt hosts use LVM-based storage pools and Fog chokes on that. There is no volume format for LVM pools but Fog doesn't correctly handle that. The attached patch sets `format_type = nil` which works around the problem. With this patch editing a host that was provisioned as a virtual machine works again, as does viewing virtual machine details of a host. So this needs to be fixed in Fog, not Foreman.

#4 Updated by Ohad Levy almost 7 years ago

  • Category set to VM management
  • Status changed from New to Closed
  • Assignee set to Ohad Levy
  • Target version set to 1.0

I've fixed this upstream at https://github.com/fog/fog/pull/1008

Also available in: Atom PDF