fix(manage): keep ssh stderr out of the Headscale JSON stream #36

Merged
jfraeys merged 1 commit from jfraeys/fix/headscale-ssh-stderr into main 2026-10-10 09:38:25 -04:00
Owner

_headscale in scripts/lib/manage/vpn.sh ran ssh with 2>&1, so any ssh warning or error merged into the stdout that callers pipe to jq. It failed one staging run's ephemeral Tailscale key mint with jq: parse error: Invalid numeric literal. It did not recur afterwards (manage vpn status works), so the trigger was transient.

stderr now stays on stderr. All callers either parse stdout JSON or discard output. manage vpn status re-checked after the change.

Not changed: the pipelines at vpn.sh:169/207 still do not check _headscale's exit status inside the pipe.

🤖 Generated with Claude Code

`_headscale` in scripts/lib/manage/vpn.sh ran ssh with `2>&1`, so any ssh warning or error merged into the stdout that callers pipe to jq. It failed one staging run's ephemeral Tailscale key mint with `jq: parse error: Invalid numeric literal`. It did not recur afterwards (`manage vpn status` works), so the trigger was transient. stderr now stays on stderr. All callers either parse stdout JSON or discard output. `manage vpn status` re-checked after the change. Not changed: the pipelines at vpn.sh:169/207 still do not check `_headscale`'s exit status inside the pipe. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(manage): keep ssh stderr out of the Headscale JSON stream
Some checks failed
Lint / lint (pull_request) Failing after 10m37s
33a92a8370
_headscale ran ssh with 2>&1, so any ssh warning or error merged into the
stdout that callers pipe to jq, failing a staging run's ephemeral Tailscale
key mint with "jq: parse error: Invalid numeric literal". stderr now stays on
stderr; every caller parses stdout JSON or discards it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jfraeys deleted branch jfraeys/fix/headscale-ssh-stderr 2026-10-10 09:38:32 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfraeys/infra!36
No description provided.