Bug #2144
closedCannot provision libvirt hosts due to MAC validation failure
Description
I am unable to provision a new libvirt guest in 1.1rc4; Foreman complains that the MAC address must be present for the host to be created.
Foreman version is 1.1RC4
Foreman host OS is SL6.2
Install method is YUM/RPM from Foreman RC repository.
Libvirt on compute resource is 0.9.10
With libvirt selected as the host's compute resource, the MAC address field is hidden on the network tab, providing no means to assign a MAC address for the default interface. Presumably, the MAC address for a VM can be auto-generated, so I suspect that this is a validation or form issue rather than a UI issue.
Attached are mildly scrubbed logs, and mildly scrubbed screenshots showing the host/network configuration in the Foreman UI.
Started POST "/hosts" for [FILTERED].88 at Fri Jan 18 14:58:33 -0800 2013 Processing by HostsController#create as Parameters: {"utf8"=>"✓", "host"=>{"operatingsystem_id"=>"1", "build"=>"1", "environment_id"=>"1", "progress_report_id"=>"[FILTERED]", "ip"=>"[FILTERED].200", "provision_method"=>"build", "ptable_id"=>"1", "updated_at"=>"1358549697", "root_pass"=>"[FILTERED]", "enabled"=>"1", "name"=>"rossi20.[FILTERED].com", "compute_resource_id"=>"1", "puppet_proxy_id"=>"1", "architecture_id"=>"1", "medium_id"=>"6", "managed"=>"true", "mac"=>"", "disk"=>"", "puppetclass_ids"=>[""], "domain_id"=>"1", "location_id"=>"1", "subnet_id"=>"1", "interfaces_attributes"=>{"new_interfaces"=>{"ip"=>"", "name"=>"", "mac"=>"", "domain_id"=>"", "provider"=>"IPMI", "_destroy"=>"false", "type"=>"Nic::Managed"}}, "is_owned_by"=>"", "overwrite"=>"false", "organization_id"=>"2", "hostgroup_id"=>"", "comment"=>""}, "authenticity_token"=>"[FILTERED]", "capabilities"=>"build"} Failed to save: Mac can't be blank, Mac is invalid Rendered hosts/_progress.erb (0.2ms) Rendered puppetclasses/_selectedClasses.html.erb (0.0ms) Rendered puppetclasses/_classes.html.erb (4.4ms) Rendered puppetclasses/_class_selection.html.erb (10.0ms) Rendered hosts/_compute.html.erb (1.9ms) Rendered common/_domain.html.erb (19.1ms) Rendered hosts/_interfaces.html.erb (232.3ms) Rendered common/os_selection/_architecture.html.erb (9.0ms) Rendered common/os_selection/_operatingsystem.html.erb (12.1ms) Rendered hosts/_operating_system.erb (32.1ms) Rendered hosts/_unattended.html.erb (299.2ms) Rendered puppetclasses/_class_parameters.html.erb (0.0ms) Rendered puppetclasses/_classes_parameters.html.erb (6.8ms) Rendered common_parameters/_inherited_parameters.erb (0.1ms) Rendered common_parameters/_puppetclass_parameter.erb (3.4ms) Rendered common_parameters/_puppetclasses_parameters.erb (6.0ms) Rendered common_parameters/_parameter.erb (2.3ms) Rendered common_parameters/_parameters.erb (4.8ms) Rendered hosts/_form.html.erb (614.4ms) Read fragment views/tabs_and_title_records-1 (0.2ms) Rendered bookmarks/_list.html.erb (3.2ms) Rendered bookmarks/_list.html.erb (0.8ms) Rendered home/_settings.html.erb (228.9ms) Write fragment views/tabs_and_title_records-1 (1.8ms) Rendered home/_topbar.rhtml (246.6ms) Rendered home/_location_dropdown.rhtml (4.0ms) Rendered home/_organization_dropdown.rhtml (3.9ms) Rendered home/_user_dropdown.rhtml (10.7ms) Rendered hosts/new.html.erb within layouts/application (879.1ms) Completed 200 OK in 1051ms (Views: 872.7ms | ActiveRecord: 14.7ms)
Files
Updated by Ohad Levy over 11 years ago
according to your posted parameters, it looks like you didnt send the vm attributes, can you confirm that your vm tab had values in it prior sending?
Updated by Ohad Levy over 11 years ago
- Status changed from New to Need more information
- Target version deleted (
1.1)
I cant reproduce this.
Updated by Chris Barbour over 11 years ago
Hi Ohad,
That makes sense. Unfortunately, the Virtual Machine tab is completely empty; there are no fields to populate on that tab. Occasionally, when I open the VM tab I see an error along the lines of "Cannot connect to rossi20." I'll post up a screen capture later today.
I have confirmed that that foreman can pull a list of VMs from libvirtd. I'm not aware of any other obvious issues.
I'll dig into the logs to see if I can identify any communication issues between formeman and my libvirt host, or other obvious logged errors.
Updated by Ohad Levy over 11 years ago
turn on debugging (see troubleshooting), it should give you additional info if its missing.
Updated by Chris Barbour over 11 years ago
Hi Ohad,
It turns out that libvirt integration was failing because no storage pool was defined on my hypervisor host. The libvirt integration failure prevented foreman from obtaining the MAC address of the new VM.
We can chalk this up to PEBCAK, and close this as not a bug. I would ask if it is possible to try to check for some of these common configuration issues in a more obvious way?
Regards,
Chris Barbour
Updated by Ohad Levy over 11 years ago
- Status changed from Need more information to Resolved