From c98e868cb303768554bc4362169ee956866d2cdf Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Sat, 12 Sep 2026 14:29:21 -0300 Subject: [PATCH] fix(xcat-core): a failed Ubuntu install stops until the provisioning timeout When a Subiquity install fails, the node stays up with no disk or network activity and reports nothing. The management node sees only the last progress line the installer printed, and the case fails on the provisioning timeout rather than on the error. The error-commands entry in compute.subiquity.tmpl pipes the log archive into "nc -l 8080". Subiquity waits for every error command to return, and that listener returns only when a collector connects, which an unattended install has none of. The archive now goes to /run on the installer, and a second command prints the end of the curtin log to the console, which the management node records with the rest of the install. XCAT_ERROR_CONSOLE names that console, so the command can be driven outside the installer. ubuntu_subiquity_error_commands.t runs the template's own error commands with nc, tar and tail replaced. Without this change the first assertion times out. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- .../share/xcat/install/ubuntu/compute.subiquity.tmpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.subiquity.tmpl b/xCAT-server/share/xcat/install/ubuntu/compute.subiquity.tmpl index 328ccd258..e83dceb8d 100644 --- a/xCAT-server/share/xcat/install/ubuntu/compute.subiquity.tmpl +++ b/xCAT-server/share/xcat/install/ubuntu/compute.subiquity.tmpl @@ -127,4 +127,9 @@ autoinstall: # monitor that died and never came back is #7759. - ['bash', '-c', 'xm=#XCATVAR:XCATMASTER#; port="#TABLEBLANKOKAY:site:key=xcatiport:value#"; [ -n "$port" ] || port=3002; ok=0; for i in 1 2 3 4 5; do if exec 3<>/dev/tcp/$xm/$port; then if read -r -t 10 hello <&3 && [ "$hello" = "ready" ]; then printf "next\n" >&3; if read -r -t 10 ack <&3 && [ "$ack" = "done" ]; then ok=1; fi; 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:$port; 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 + # Subiquity waits for every error command to return. "nc -l 8080" waits for a collector, which + # an unattended install does not have, so the node held the failure until the provisioning + # timeout reset it and the reason never left the node. Keep the archive on the installer, and + # print the end of the curtin log to the console, which the management node records. + - ['sh', '-c', 'tar -c --ignore-failed-read --transform="s/^/#HOSTNAME#-logs\//" /var/crash /var/log/installer /tmp/pre-install.log /autoinstall.yaml >/run/#HOSTNAME#-logs.tar 2>/dev/null; exit 0'] + - ['sh', '-c', 'tail -n 80 /var/log/installer/curtin-install.log >"${XCAT_ERROR_CONSOLE:-/dev/console}" 2>/dev/null; exit 0']