Project

General

Profile

Actions

Bug #35292

open

Foreman fails to assign IPv6-only NIC as primary, sets any other NIC with an IPv4 as primary instead

Added by Leos Stejskal over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Host registration
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2030487

Description of problem:

When registering a host that has 3 NICs (eth0, eth1, eth2) where eth0 is IPv6-only and eth1,eth2 have neither IPv4 nor IPv6 addresses,
Foreman selects an IP-less NIC (eth1 during my tests) as primary instead of selecting the only NIC that has an IP address (eth0 with an IPv6 address).

In a more schematic form:

TEST HOST:
neth0: nice ULA-class IPv6 address; no IPv4 address.
eth1: no IP addresses.
eth2: no IP addresses.

Result: Foreman chooses eth1 as the primary interface.

SECOND TEST:
eth0: nice ULA-class IPv6 address; no IPv4 address.
eth1: no IP addresses.
eth2: no IPv6 address;

IPv4 manually added as 192.168.111.222/24.
(note: Foreman does not know the 192.168.111.0/24 subnet.)

Result: Foreman chooses eth2 as the primary interface.

Note that this happens despite Foreman knowing the IPv6 subnet as expected:
the IPv6 subnet used by the test host exists as a Subnet object on Satellite and is properly configured,
Foreman itself has an IPv6 address on the same IPv6 subnet, Foreman can resolve the test host's name to its IPv6 address only,
and can correctly reverse-resolve that IPv6 to the hostname.

Version-Release number of selected component (if applicable):
Satellite 6.9.7 (foreman-2.3.1.25-2.el7sat.noarch)
Satellite 6.10.1 (foreman-2.5.2.17-2.el7sat.noarch)

Steps to Reproduce:
1. Create IPv6 subnet on Satellite named subnet_ipv6, link it to a domain named example.ipv6.
2. Create on Satellite a hostgroup that links to the new IPv6 subnet and its respective domain and name it hg_ipv6.
3. Create host, give it no IPv4 address and an IPv6 address in the subnet_ipv6 subnet.
4. On the Satellite web UI, generate a Register script by navigating to Hosts > All Hosts > Register Host. Select the hg_ipv6 hostgroup and all other values appropriately.
5. Run the generated register command on the host.

Actual results:
Satellite will never select eth0 -- the NIC with only an IPv6 address -- as primary.
In fact, Satellite will not record any IP addresses on eth0.
Satellite will even choose eth1 (IP-less) over eth0.
Satellite will even say eth1 is in subnet_ipv6 and is the interface whose FQDN matches the test host's name.

Alternatively, when eth1 or eth2 is given any IPv4 address -- even within a subnet Satellite does not know about -- Satellite will
choose that NIC over eth0's perfectly functional IPv6 address.

Expected results:
Satellite would know to select the interface that actually works, even if it's an IPv6-only interface.

Additional info:
Output of some key Satellite and host configs will be uploaded to this BZ shortly.

Actions #1

Updated by Leos Stejskal over 1 year ago

  • Subject changed from Foreman fails to assign IPv6-only NIC as primary, sets any other NIC with an IPv4 as primary instead to Foreman fails to assign IPv6-only NIC as primary, sets any other NIC with an IPv4 as primary instead
  • Category set to Host registration
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF