From 9a33f64257c29c36843b2e4fb4fe14328c340f8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Thu, 23 Jul 2026 19:19:23 -0300 Subject: [PATCH 1/3] fix(genesis): find the boot NIC over InfiniBand (IPoIB) When a node boots from an InfiniBand interface, doxcat could not match BOOTIF to the netdev, so boot-nic detection failed. Load ib_ipoib and, if the normal Ethernet lookup finds nothing, fall back to matching the InfiniBand device by its (shorter) IPoIB address. modprobe ib_ipoib is harmless where there is no IB hardware (the module simply loads no devices), and the IB lookup only runs when the Ethernet lookup fails, so non-IB nodes are unaffected. Not lab-validated (no InfiniBand fabric available; the SR635's Mellanox card is in Ethernet mode). Recovered from the unmerged lenovobuild branch (aeeebd5f). Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com> --- xCAT-genesis-scripts/usr/bin/doxcat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-genesis-scripts/usr/bin/doxcat b/xCAT-genesis-scripts/usr/bin/doxcat index 0bf5e360a..40a2722b2 100755 --- a/xCAT-genesis-scripts/usr/bin/doxcat +++ b/xCAT-genesis-scripts/usr/bin/doxcat @@ -32,6 +32,7 @@ logger -s -t $log_label -p local4.info "Beginning doxcat process..." modprobe acpi_cpufreq 2>/dev/null # on some machines this fails modprobe cpufreq_ondemand +modprobe ib_ipoib if ls /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor &>/dev/null; then if grep -q ondemand /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors; then for gov in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do @@ -41,10 +42,14 @@ if ls /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor &>/dev/null; then fi if [ ! -z "$BOOTIF" ]; then BOOTIF=`echo $BOOTIF|sed -e s/01-// -e s/-/:/g` + IBOOTIF=`echo $BOOTIF|sed -e s/^..//` logger -s -t $log_label -p local4.info "Waiting for device with address $BOOTIF to appear.." gripeiter=6000 while [ -z "$bootnic" ]; do bootnic=`ip link show|grep -B1 $BOOTIF|grep mtu|awk '{print $2}'|sed -e 's/:$//'` + if [ -z "$bootnic" ]; then + bootnic=`ip link show|grep -B1 infiniband|grep -B1 $IBOOTIF|grep mtu|awk '{print $2}'|sed -e 's/:$//'` + fi sleep 0.1 if [ $gripeiter = 0 ]; then logger -s -t $log_label -p local4.err "Unable to find boot device (Maybe the xCAT genesis kernel is missing the driver for your NIC?)" From 844a5ca2fab3d6b458ba4637ef8f69fa6cf511ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Mon, 27 Jul 2026 15:19:33 -0300 Subject: [PATCH 2/3] fix(genesis): include InfiniBand kernel modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com> --- xCAT-genesis-builder/xCAT-genesis-base.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-genesis-builder/xCAT-genesis-base.spec b/xCAT-genesis-builder/xCAT-genesis-base.spec index fe544f319..1a6f0f212 100644 --- a/xCAT-genesis-builder/xCAT-genesis-base.spec +++ b/xCAT-genesis-builder/xCAT-genesis-base.spec @@ -51,6 +51,8 @@ BuildRequires: ipmitool BuildRequires: iproute BuildRequires: kexec-tools BuildRequires: kernel-core +BuildRequires: kernel-modules +BuildRequires: kernel-modules-extra BuildRequires: lldpad BuildRequires: lvm2 BuildRequires: mdadm From 1d6ed6a4eb48c39c058a5a758ebd886e19e9cad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Mon, 27 Jul 2026 15:19:33 -0300 Subject: [PATCH 3/3] test(genesis): cover InfiniBand module packaging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com> --- xCAT-test/unit/genesis_ib_modules.t | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 xCAT-test/unit/genesis_ib_modules.t diff --git a/xCAT-test/unit/genesis_ib_modules.t b/xCAT-test/unit/genesis_ib_modules.t new file mode 100644 index 000000000..ef2c3f36e --- /dev/null +++ b/xCAT-test/unit/genesis_ib_modules.t @@ -0,0 +1,40 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +use File::Spec; +use FindBin; +use Test::More; + +my $repo_root = File::Spec->rel2abs(File::Spec->catdir($FindBin::Bin, '..', '..')); + +my $spec = read_file('xCAT-genesis-builder/xCAT-genesis-base.spec'); +like($spec, qr/^BuildRequires:\s+kernel-core$/m, 'genesis build installs the kernel core'); +like($spec, qr/^BuildRequires:\s+kernel-modules$/m, 'genesis build installs the standard kernel modules'); +like($spec, qr/^BuildRequires:\s+kernel-modules-extra$/m, 'genesis build installs the extra kernel modules'); + +my $dracut_module = read_file('xCAT-genesis-builder/dracut_105/el/module-setup.sh'); +like( + $dracut_module, + qr/installkernel\(\) \{.*?modules_dep=.*?while IFS= read -r modfile;.*?instmods "\$modname".*?done < "\$modules_dep"/s, + 'genesis dracut module installs every module available to the build' +); + +my $doxcat = read_file('xCAT-genesis-scripts/usr/bin/doxcat'); +like($doxcat, qr/^modprobe ib_ipoib$/m, 'genesis loads the IP over InfiniBand module'); +like( + $doxcat, + qr/if \[ -z "\$bootnic" \]; then\s+bootnic=`ip link show\|grep -B1 infiniband/s, + 'genesis checks InfiniBand addresses only after the Ethernet lookup misses' +); + +done_testing(); + +sub read_file { + my ($file) = @_; + my $path = File::Spec->catfile($repo_root, split m{/}, $file); + open(my $fh, '<', $path) or die "open $path: $!"; + my $contents = do { local $/; <$fh> }; + close($fh) or die "close $path: $!"; + return $contents; +}