dashboard restarts forever when the tailscale sidecar it shares a namespace with has stopped
Id: TD-PPagop-26082303 · Status: resolved · Filed: 2026-08-23 · Resolved: 2026-08-23 · Ref: https://github.com/Poetic-Poems/agent-ops/pull/704
deploy/docker/compose.yaml’s dashboard service takes its restart policy
from the shared x-agent-ops block (restart: unless-stopped) and its
network from the sidecar (network_mode: service:tailscale). Since PR #698
the tailscale service alone is bounded (restart: on-failure:5), so on a
tailnet node with no TS_AUTHKEY the sidecar now stops for good after five
attempts — and dashboard cannot start at all without it, because Docker
refuses to join the network namespace of a container that is not running.
unless-stopped then retries that failure indefinitely, at Docker’s capped
backoff of roughly one attempt a minute.
The loop issue #644 described therefore moves rather than ends: the node still shows a container thrashing forever, just a different one.
Materially less harmful than the loop it replaces, which is why it was
not fixed in #698: dashboard restarting registers nothing against the
tailnet and creates no ephemeral nodes — it fails before its own process
starts, with Docker’s own “cannot join network namespace” error. The
operator-visible cost is a noisy docker compose ps/docker events on a
misconfigured node, and the loss of the loud, terminal failure the guard was
added to produce: the stopped tailscale container and its one clear error
line are easy to miss beside a container restarting once a minute.
Suggested fix, in the order they seem worth considering:
- Give
dashboardthe same bounded policy as the sidecar it depends on (restart: on-failure:5on the service, overriding the anchor’sunless-stopped), so a node whose sidecar has given up settles rather than thrashes. Weigh this againstdashboard’s ordinary need to come back from a transient failure indefinitely — its five attempts would then also bound the healthy case. - Or make the dependency explicit —
depends_on: tailscale: {condition: service_healthy}with a healthcheck on the sidecar — sodashboardis never started into a namespace that does not exist.
Whichever is chosen, docs/IMPLEMENTATION-PIPELINE-SPEC.md’s dashboard
entry (the “node stack” list) and acceptance check 1c-v both describe this
area and would need to keep pace.
Noticed by the Reviewer while working PR #698 (issue #644).