Bug #10168
closedForeman names VM's incorrectly when using multiple nics for provisioning
Description
Using Foreman 1.8rc3 and multiple nics:
eth0:
DNS Name = servername
Checked items = Primary
Network = Static
eth1:
DNS Name = servername-dhcp
Checked items = Manged, Provisioning
Network = DHCP
When 'submit' is clicked, VMware creates the vm with the name 'servername-dhcp'. I'd expect the VM name to be the the same as the "Primary" interface.
The host is created with the correct "Primary" interface name in Foreman, 'servername'. The yaml output from the provisioned host reflects the correct settings:
foreman_interfaces:
- mac: 00:50:56:93:02:6a
ip: 1.2.3.4
type: Interface
name: servername.domain.name
attrs: {}
virtual: false
link: true
identifier: eth0
managed: false
primary: true
provision: false
subnet:
network: 1.2.3.0
mask: 255.255.254.0
name: Scratch
vlanid: '141'
gateway: 1.2.3.1
dns_primary: 1.2.3.3
dns_secondary: 1.2.3.2
from: ''
to: ''
boot_mode: Static
ipam: None
- mac: 00:50:56:93:15:84
ip: 2.3.4.5
type: Interface
name: servername-dhcp.domain.name
attrs: {}
virtual: false
link: true
identifier: eth1
managed: true
primary: false
provision: true
subnet:
network: 2.3.4.0
mask: 255.255.254.0
name: Dev-DHCP
vlanid: '193'
gateway: ''
dns_primary: 1.2.3.3
dns_secondary: 1.2.3.2
from: 2.3.4.4
to: 2.3.4.240
boot_mode: DHCP
ipam: DHCP
Updated by Dominic Cleal over 9 years ago
- Translation missing: en.field_release set to 28
This looks related to the "use_shortname_for_vms" setting. When it's enabled, the VM short name is delegated to the provisioning, not the primary interface. When it's disabled (default), the VM name is the primary hostname.
Updated by Dominic Cleal over 9 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
Related issues:
- the "name" field on the host edit form is getting its name from the provisioning interface, not the primary (it also uses shortname), which can even be blank
- when overriding a smart class parameter from the host edit page, it uses the FQDN of the provisioning interface, so validation fails and it isn't ever saved, so you can't override values if interfaces differ
Updated by The Foreman Bot over 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2317 added
- Pull request deleted (
)
Updated by Dominic Cleal over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 4d5b979541902c2163d98ca8fd53d230445b60ac.