From 64a7bfca000adfb4530b6015a905e8497c69ca4e Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Sun, 8 Nov 2026 17:08:55 -0300 Subject: [PATCH] fix(xcat-core): Genesis OpenEmbedded asks for DHCPv6 on every nic The OpenEmbedded Genesis image runs DHCPv6 on every nic of a node under one DUID, so a node with several nics on the provisioning network holds its reserved address on whichever nic asked first. When that is not the boot nic, xcatd receives the node's report from a pool address and cannot name the node. xcat-genesis-bootnic.service runs genesis-bootnic before NetworkManager starts, on the same condition and ordering as xcat-genesis-duid.service. The recipe installs both the script and the unit, and enables the unit. A secondary nic is put on link-local rather than disabled, so the node still reports that nic to xcatd for its nic data and only stops asking for an address the reservation holds. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- .../files/xcat-genesis-bootnic.service | 14 ++++++++++++++ .../xcat-genesis-network_1.0.bb | 10 +++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/files/xcat-genesis-bootnic.service diff --git a/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/files/xcat-genesis-bootnic.service b/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/files/xcat-genesis-bootnic.service new file mode 100644 index 0000000000..5b25644801 --- /dev/null +++ b/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/files/xcat-genesis-bootnic.service @@ -0,0 +1,14 @@ +[Unit] +Description=Keep the xCAT Genesis DHCPv6 reservation on the boot nic +ConditionKernelCommandLine=xcatd +After=systemd-udev-trigger.service +Before=NetworkManager.service xcat-genesis-network-state.service + +[Service] +Type=oneshot +ExecStart=/usr/libexec/xcat/genesis-bootnic +TimeoutStartSec=30 +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/xcat-genesis-network_1.0.bb b/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/xcat-genesis-network_1.0.bb index 3126792221..96c767c131 100644 --- a/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/xcat-genesis-network_1.0.bb +++ b/xCAT-genesis-base/oe/meta-xcat-genesis/recipes-connectivity/xcat-genesis-network/xcat-genesis-network_1.0.bb @@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/EPL-1.0;md5=57f8d5e2b3e98ac6e08 SRC_URI = "file://10-xcat-genesis.conf \ file://genesis-duid \ file://xcat-genesis-duid.service \ + file://genesis-bootnic \ + file://xcat-genesis-bootnic.service \ " S = "${UNPACKDIR}" @@ -12,7 +14,7 @@ inherit systemd RDEPENDS:${PN} = "bash coreutils networkmanager-daemon networkmanager-nmcli util-linux-logger" -SYSTEMD_SERVICE:${PN} = "xcat-genesis-duid.service" +SYSTEMD_SERVICE:${PN} = "xcat-genesis-duid.service xcat-genesis-bootnic.service" SYSTEMD_AUTO_ENABLE = "enable" do_install() { @@ -23,13 +25,19 @@ do_install() { install -d ${D}${libexecdir}/xcat install -m 0755 ${UNPACKDIR}/genesis-duid \ ${D}${libexecdir}/xcat/genesis-duid + install -m 0755 ${UNPACKDIR}/genesis-bootnic \ + ${D}${libexecdir}/xcat/genesis-bootnic install -d ${D}${systemd_system_unitdir} install -m 0644 ${UNPACKDIR}/xcat-genesis-duid.service \ ${D}${systemd_system_unitdir}/xcat-genesis-duid.service + install -m 0644 ${UNPACKDIR}/xcat-genesis-bootnic.service \ + ${D}${systemd_system_unitdir}/xcat-genesis-bootnic.service } FILES:${PN} = "${sysconfdir}/NetworkManager/conf.d/10-xcat-genesis.conf \ ${libexecdir}/xcat/genesis-duid \ + ${libexecdir}/xcat/genesis-bootnic \ ${systemd_system_unitdir}/xcat-genesis-duid.service \ + ${systemd_system_unitdir}/xcat-genesis-bootnic.service \ "