From eeec9ce302a37e402c0345a0e85a1a5478097bc7 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 20 Jul 2026 10:55:53 +0000 Subject: [PATCH] Fix duplicate-host check reporting false SSH failures The remote bash script run over SSH ended with a for-loop whose last statement was `[[ "$n" == "$target" ]] && echo ...`. When the last VM/CT checked on the node didn't match --host, that test evaluated false and became the exit status of the whole remote script (1) -- which the wrapper then misreported as "couldn't reach the node", even though SSH connectivity and the check itself were both fine. The actual signal is the script's stdout, not its exit code, so end it with an explicit exit 0. Co-Authored-By: Claude Sonnet 5 --- scripts/create-proxmox-resource.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/create-proxmox-resource.sh b/scripts/create-proxmox-resource.sh index e10473e..ac82260 100755 --- a/scripts/create-proxmox-resource.sh +++ b/scripts/create-proxmox-resource.sh @@ -320,6 +320,7 @@ for id in $(pct list 2>/dev/null | awk 'NR>1{print $1}'); do n="$(pct config "$id" 2>/dev/null | grep -oP '^hostname:\s*\K\S+' || true)" [[ "$n" == "$target" ]] && echo "lxc ${id} ${n}" done +exit 0 REMOTE_SCRIPT )" || ssh_check_status=$? if [[ "$ssh_check_status" -ne 0 ]]; then -- 2.54.0