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