Trying to edit a host that was provisioned as a Libvirt VM results in Oops
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.
#1 Updated by Ohad Levy almost 11 years ago
just to be on the safe side, can you also attach your vm xml dump?
#2 Updated by Andreas Ntaflos almost 11 years ago
- File bondev08.xml bondev08.xml added
Attaching VM XML dump.
#3 Updated by Andreas Ntaflos almost 11 years ago
- File list_volumes.rb.patch list_volumes.rb.patch added
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 11 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