From 1cbdad25312bd63aa56a20e7d1ef8b2560b6fcf9 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Fri, 28 Aug 2026 09:38:44 -0300 Subject: [PATCH] fix(xcat-core): correct the boot-flip comment The comment blamed mawk: updateflag.awk needs gawk's |& and Ubuntu's /usr/bin/awk is mawk. That is wrong on this path -- compute.subiquity.tmpl has installed gawk in the target since Ubuntu 20.04 support was added, so updateflag.awk would have found it. The flip was going unanswered because xcatd's install monitor, which serves port 3002, dies and is never re-forked. That is fixed in #7759. The /dev/tcp exchange here is hardening: it retries and reports, rather than reinstalling in silence. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- .../share/xcat/install/ubuntu/compute.subiquity.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.subiquity.tmpl b/xCAT-server/share/xcat/install/ubuntu/compute.subiquity.tmpl index 783ebc2de..f82aec459 100644 --- a/xCAT-server/share/xcat/install/ubuntu/compute.subiquity.tmpl +++ b/xCAT-server/share/xcat/install/ubuntu/compute.subiquity.tmpl @@ -108,9 +108,9 @@ autoinstall: curtin in-target --target /target /root/post.script; } >>/target/var/log/xcat/xcat.log 2>&1' # Flip the node to local-disk boot, or it PXE-loops back into the installer on reboot. - # The in-target post-script does this through updateflag.awk, which needs gawk's |& and - # Ubuntu's /usr/bin/awk is mawk, so it silently failed. Send "next" to xcatd from the live - # installer over bash's /dev/tcp instead, and log a failure rather than reinstalling. + # "next" is the request xcatd's install monitor answers with "nodeset next". Send it + # from the live installer, retried, and log a failure rather than silently reinstalling. A + # monitor that died and never came back is a separate problem; see #7759. - ['bash', '-c', 'xm=#XCATVAR:XCATMASTER#; ok=0; for i in 1 2 3 4 5; do if exec 3<>/dev/tcp/$xm/3002; then read -r r <&3 || true; printf "next\n" >&3; if read -r r <&3; then ok=1; fi; exec 3>&- 3<&-; [ "$ok" = 1 ] && break; fi; sleep 5; done; if [ "$ok" != 1 ]; then echo "xcat: FAILED to flip $(hostname) to local-disk boot via $xm:3002; the node will PXE back into the installer" >>/target/var/log/xcat/xcat.log; fi; exit 0'] error-commands: - tar -c --ignore-failed-read --transform='s/^/#HOSTNAME#-logs\//' /var/crash /var/log/installer /tmp/pre-install.log /autoinstall.yaml 2>/dev/null |nc -l 8080