Fix duplicate-host check reporting false SSH failures #8

Merged
beatzaplenty merged 1 commits from worktree-fix-duplicate-host-check-exitcode into main 2026-07-20 11:00:28 +00:00
Owner

Fixes a bug in the duplicate-host check where the remote SSH check-script exited non-zero (and got misreported as "couldn't reach the node") whenever the last VM/CT scanned on the Proxmox node did not match --host -- an ordinary "no match, host is clear" outcome, not an SSH failure. The check's actual signal is its stdout, not its exit code, so the remote script now ends with an explicit exit 0.\n\n## Test plan\n- [x] bash -n scripts/create-proxmox-resource.sh\n- [ ] Operator: re-run create-proxmox-resource.sh --type lxc --host nix-cache ... against pve.sweet.home and confirm the duplicate-host check no longer false-positives as unreachable

Fixes a bug in the duplicate-host check where the remote SSH check-script exited non-zero (and got misreported as "couldn't reach the node") whenever the last VM/CT scanned on the Proxmox node did not match `--host` -- an ordinary "no match, host is clear" outcome, not an SSH failure. The check's actual signal is its stdout, not its exit code, so the remote script now ends with an explicit `exit 0`.\n\n## Test plan\n- [x] `bash -n scripts/create-proxmox-resource.sh`\n- [ ] Operator: re-run `create-proxmox-resource.sh --type lxc --host nix-cache ...` against pve.sweet.home and confirm the duplicate-host check no longer false-positives as unreachable
beatzaplenty added 1 commit 2026-07-20 10:57:42 +00:00
Fix duplicate-host check reporting false SSH failures
Check NixOS configurations / eval-hosts (pull_request) Failing after 11m38s
eeec9ce302
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 <noreply@anthropic.com>
beatzaplenty merged commit 9133afd444 into main 2026-07-20 11:00:28 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No labels
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: beatzaplenty/nixos#8