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