From 616162e42460dba0b465538a63fbdc75a1ab7fd6 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Wed, 26 Aug 2026 18:09:45 -0300 Subject: [PATCH] test(xcat-core): a failed monitor respawn strands xcatiport for the rest of the bundle The new xcatd_install_monitor_respawns case kills the install monitor to prove it comes back. When it does not come back, the case simply ends there, and the MN is left running a daemon whose xcatiport is dead. xcattest does not stop a case at the first failed check -- the only "last" statements are inside the check loops, so every remaining cmd still runs -- but it has no teardown either, and the next case in the bundle that provisions a node would then fail because nothing is listening for install status, not because of anything it did. One real failure would read as a cascade of unrelated ones. Restore the daemon at the end of the case, and only if the monitor is actually missing, so a passing run stays a no-op rather than restarting xcatd for nothing. Verified against a live MN: with the monitor present the step exits 0 and leaves the running pid untouched. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/autotest/testcase/xcatd/case0 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-test/autotest/testcase/xcatd/case0 b/xCAT-test/autotest/testcase/xcatd/case0 index d2b61ceec..079b4599f 100644 --- a/xCAT-test/autotest/testcase/xcatd/case0 +++ b/xCAT-test/autotest/testcase/xcatd/case0 @@ -212,4 +212,9 @@ cmd:pgrep -f "^xcatd: SSL listener$" | diff -q - /tmp/xcatd_monitor_respawn/list check:rc==0 cmd:rm -rf /tmp/xcatd_monitor_respawn check:rc==0 +#if the respawn did not happen, this MN is left with a dead xcatiport, and every later case +#in the bundle that provisions a node would fail for that reason instead of its own. a failed +#check does not stop the remaining cmds of a case, so restore the daemon unconditionally here +cmd:pgrep -f "^xcatd: install monitor$" >/dev/null || { if [ -d /run/systemd/system ] && command -v systemctl >/dev/null 2>&1; then XCATBYPASS=YES systemctl restart xcatd; else XCATBYPASS=YES service xcatd restart; fi; sleep 5; } +check:rc==0 end