From 32149f10f47bbd612c76da6773728c005dcb3bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Tue, 21 Jul 2026 22:07:30 -0300 Subject: [PATCH] fix(genesis): only wait 20s for NIC init on ppc64 The genesis boot script sleeps 20 seconds unconditionally with the comment "wait for NIC initialization", but that wait exists solely for System P LE (ppc64) hardware discovery -- the surrounding section is explicitly ppc64 only. Every x86_64 and aarch64 node therefore pays a needless 20s delay on each genesis boot. Move the sleep inside the `[[ ${ARCH} =~ ppc64 ]]` block so only ppc64 waits. Applied to the base script and both dracut_105 (el, ubuntu) variants. Recovered from the unmerged lenovobuild branch (original d0916d9d). Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com> --- xCAT-genesis-builder/dracut_105/el/xcat-cmdline.sh | 4 ++-- xCAT-genesis-builder/dracut_105/ubuntu/xcat-cmdline.sh | 4 ++-- xCAT-genesis-builder/xcat-cmdline.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-genesis-builder/dracut_105/el/xcat-cmdline.sh b/xCAT-genesis-builder/dracut_105/el/xcat-cmdline.sh index cfe13783d..d0e6f053f 100755 --- a/xCAT-genesis-builder/dracut_105/el/xcat-cmdline.sh +++ b/xCAT-genesis-builder/dracut_105/el/xcat-cmdline.sh @@ -46,11 +46,11 @@ while :; do tmux new-session < /dev/tty2 &> /dev/tty2 ; done & # The section below is just for System P LE hardware discovery -# Need to wait for NIC initialization -sleep 20 ARCH="$(uname -m)" if [[ ${ARCH} =~ ppc64 ]]; then + # Need to wait for NIC initialization (System P LE discovery only) + sleep 20 # load all network driver modules listed in /lib/modules//modules.dep file KERVER=`uname -r` for line in `cat /lib/modules/$KERVER/modules.dep | awk -F: '{print \$1}' | sed -e "s/\(.*\)\.ko.*/\1/"`; do diff --git a/xCAT-genesis-builder/dracut_105/ubuntu/xcat-cmdline.sh b/xCAT-genesis-builder/dracut_105/ubuntu/xcat-cmdline.sh index c479f9e91..b6e3a0ce5 100755 --- a/xCAT-genesis-builder/dracut_105/ubuntu/xcat-cmdline.sh +++ b/xCAT-genesis-builder/dracut_105/ubuntu/xcat-cmdline.sh @@ -46,11 +46,11 @@ while :; do screen -ln < /dev/tty2 &> /dev/tty2 ; done & # The section below is just for System P LE hardware discovery -# Need to wait for NIC initialization -sleep 20 ARCH="$(uname -m)" if [[ ${ARCH} =~ ppc64 ]]; then + # Need to wait for NIC initialization (System P LE discovery only) + sleep 20 # load all network driver modules listed in /lib/modules//modules.dep file KERVER=`uname -r` for line in `cat /lib/modules/$KERVER/modules.dep | awk -F: '{print \$1}' | sed -e "s/\(.*\)\.ko.*/\1/"`; do diff --git a/xCAT-genesis-builder/xcat-cmdline.sh b/xCAT-genesis-builder/xcat-cmdline.sh index 15ead2175..525ea19c9 100755 --- a/xCAT-genesis-builder/xcat-cmdline.sh +++ b/xCAT-genesis-builder/xcat-cmdline.sh @@ -46,11 +46,11 @@ while :; do screen -ln < /dev/tty2 &> /dev/tty2 ; done & # The section below is just for System P LE hardware discovery -# Need to wait for NIC initialization -sleep 20 ARCH="$(uname -m)" if [[ ${ARCH} =~ ppc64 ]]; then + # Need to wait for NIC initialization (System P LE discovery only) + sleep 20 # load all network driver modules listed in /lib/modules//modules.dep file KERVER=`uname -r` for line in `cat /lib/modules/$KERVER/modules.dep | awk -F: '{print \$1}' | sed -e "s/\(.*\)\.ko.*/\1/"`; do