Red Hat Bugzilla – Bug 1476651
Primary interface is not recognized when VLAN id is entered
Last modified: 2018-01-09 09:17:28 EST
ORIGINAL DESCRIPTION (anonymized)
Using the VLANID feature to use VLAN Tag during discovery and trying FDI image 6.2 and latest 6.4.0 failed to PXE-less provisioned a physical system,
As per facts shown in production.log, discovery_bootif is picking up UUID of a non-active interface, not the primary interface set in VLAN:
* NETWORK CONFIGURATION *
NAME UUID TYPE DEVICE
primary 45c4fdee-4c10-11e7-a233-40f2e9c2b808 vlan eno1.463
secondary-40:f2:e9:xx:xx:xx 45d04ece-4c10-11e7-a53b-40f2e9c2b808 802-3-ethernet --
secondary-40:f2:e9:xx:xx:xx eb204704-4c0f-11e7-b727-40f2e9c2b808 802-3-ethernet --
Version-Release number of selected component (if applicable):
How reproducible: Always
Steps to Reproduce:
1- Boot the server from the foreman discovery iso v 3.4 downloaded upstream "http://downloads.theforeman.org/discovery/releases/3.4/"
2- Select Manual Discovery
3- Select the interface , and in the same window at the bottom you can find the VLAN ID
4- Enter the IP/MASK/GATEWAY and DNS servers
5- Hit next, then the tool configures new interface with name <interface.vlanid> (example enp0s8.463) and moves to the next screen
At this point the interface is up and pingable on the network
6- Enter the Satellite server IP:PORT and Proxy setting and selecting proxy.
7- No custom facts configured, hitting next
Server discovery returns with error:
ERROR -- : Discovery failed, code 422, reason: ERF42-1064 [Foreman::Exception]: Unable to assign subnet, primary interface is missing IP address
PXE-less provision succeeds using the VLAN configured Primary interface.
Can ssh to the Host via the interface that is configured with the IP address which means it is routable back to the Server.
On the last Custom page screen, enter the primary interface mac address:
This should override the facts reported.
In Satellite6 select different fact that could hold primary interface, this could be "macaddress". This could also work. In Satellite6 in Administer - Setting set "Interface fact" to "macaddress" (it is "discovery_bootif" by default).
Alternatively, when using same network cards on all systems, this can be set to "macaddress_enp0s8.463" which will contain the correct MAC address, but this will only work for subset of hosts.
Okay, there are two problems, both stems from the fact that when VLAN is set up, both eth0 and eth0.VLANID interfaces have same MAC address:
A) Discovery primary NIC detection does not priorize NIC with IP, since eth0 comes first it detects wrong one without IP. Easy fix, one liner.
B) NIC importer in Foreman core does not properly handle situation when two interfaces have same MAC address. This is more complex issue that needs further investigation.