From 2e2ac69f781952b9e5f940c47756efb14bc8efbc Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Sun, 8 Nov 2026 22:49:07 -0300 Subject: [PATCH] fix(xcat-core): Genesis OpenEmbedded still asks for DHCPv6 on every nic On a node with three nics on the provisioning network, every nic sent a DHCPv6 SOLICIT under the same DUID. A secondary nic took the reserved address and the boot nic got a pool address, so xcatd could not match the findme report to the node. genesis-bootnic tried to restrict DHCPv6 with ipv6.method in [connection-*] sections of a conf.d file. NetworkManager does not accept ipv6.method as a connection default and ignores it. genesis-bootnic now writes two keyfile profiles: one bound to the BOOTIF address with ipv6.method=auto and the higher autoconnect priority, and one multi-connect profile with ipv6.method=link-local for every other nic. genesis_openembedded_bootnic.bats fails without this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- .../files/genesis-bootnic | 53 ++++++++++++++----- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/files/genesis-bootnic b/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/files/genesis-bootnic index 4aeaeb8be9..1f7808af9f 100755 --- a/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/files/genesis-bootnic +++ b/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/files/genesis-bootnic @@ -13,10 +13,9 @@ LC_ALL=C export LC_ALL cmdline_file=${XCAT_CMDLINE_FILE:-/proc/cmdline} -conf_dir=${XCAT_NM_CONF_DIR:-/etc/NetworkManager/conf.d} -# NetworkManager reads conf.d in name order and a later file wins, so this sorts after -# 15-xcat-genesis-duid.conf, which the DUID is written to. -conf_file=$conf_dir/16-xcat-genesis-bootnic.conf +# NetworkManager.conf(5) does not accept ipv6.method as a [connection] default, so the +# restriction is two connection profiles. The DHCPv6 defaults in conf.d still apply to both. +connection_dir=${XCAT_NM_CONNECTION_DIR:-/etc/NetworkManager/system-connections} log() { logger -t xcat-genesis-bootnic -- "$*" || true @@ -43,18 +42,44 @@ case $mac in *) log "BOOTIF $bootif is not a hardware address, leaving DHCPv6 on every nic"; exit 0 ;; esac -mkdir -p "$conf_dir" || exit 1 -# link-local, not disabled: a secondary nic keeps IPv6 on the link and the node still reports -# it to xcatd for the nic data, it just does not ask for an address the reservation holds. -cat >"$conf_file" <"$connection_dir/xcat-genesis-bootnic.nmconnection" <"$connection_dir/xcat-genesis-secondary.nmconnection" <