Bug 1476651 - Primary interface is not recognized when VLAN id is entered
Primary interface is not recognized when VLAN id is entered
Status: NEW
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Discovery Image (Show other bugs)
6.2.10
x86_64 Linux
medium Severity medium (vote)
: Unspecified
: 6.X
Assigned To: Lukas Zapletal
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-30 23:37 EDT by jalviso
Modified: 2018-04-27 01:19 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 4 Lukas Zapletal 2017-09-21 08:30:21 EDT
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:

"discovery_bootif"=>"40:f2:e9:xx:xx:xx"

From discovery-debug:

* 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):
6.2.10

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 

Actual results:

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 

Expected results:

PXE-less provision succeeds using the VLAN configured Primary interface.

Additional info:

Can ssh to the Host via the interface that is configured with the IP address which means it is routable back to the Server.
Comment 5 Lukas Zapletal 2017-09-21 08:36:22 EDT
WORKAROUND:

On the last Custom page screen, enter the primary interface mac address:

Fact name:
discovery_bootif

Fact value:
40:f2:e9:xx:xx:xx

This should override the facts reported.

ALTERNATIVE WORKAROUND:

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.
Comment 11 Lukas Zapletal 2018-01-09 09:15:44 EST
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.

http://projects.theforeman.org/issues/22193

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.

http://projects.theforeman.org/issues/22192

Note You need to log in before you can comment on or make changes to this bug.