Skip to content

bind = "auto": wait for the default route instead of failing at boot - #3

Merged
sfxnz merged 1 commit into
mainfrom
fix/auto-bind-wait-for-route
Oct 22, 2026
Merged

sfxnz merged 1 commit into
mainfrom
fix/auto-bind-wait-for-route

Conversation

@sfxnz

@sfxnz sfxnz commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Problem

After a reboot of both sparks (2026-10-22), the console on spark1 and the agent on spark2 stayed down:

bind = "auto" could not find an IPv4 address on the default-route interface (no default route). Set bind to an explicit LAN IP.
sparkline.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

network-online.target was reached once the CX7 links and tailscale0 were up, before the LAN had its default route. Exit status 2 is in RestartPreventExitStatus, so systemd never retried.

Fix

resolve_bind("auto") now polls for up to 120 s for the default-route interface to get an IPv4 address before raising. A real misconfiguration still exits 2 after the wait.

Tests

  • New test_resolve_bind_auto_waits_for_route (route appears on the third poll).
  • Full server suite: 334 passed.

🤖 Generated with Claude Code

network-online.target can be reached by other links (CX7, tailscale0) before
the LAN has its default route. resolve_bind("auto") then raised, the service
exited with status 2, and RestartPreventExitStatus=2 kept it down after a
reboot. Poll for up to 120 s before giving up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sfxnz
sfxnz merged commit e015095 into main Oct 22, 2026
3 checks passed
@sfxnz
sfxnz deleted the fix/auto-bind-wait-for-route branch October 22, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant