fix: reset Tailscale Funnel state on 7.2 restarts#2616
Conversation
- Purpose: backport PR #2600 to the 7.2 branch so Docker template changes clear old Tailscale Serve and Funnel exposure.\n- Before: switching a container from Funnel or Serve to No removed the env vars but left the persisted Tailscale serve/funnel config active after restart.\n- Why: the container hook only applied new serve settings when TAILSCALE_SERVE_PORT was present and never reset existing serve state stored in the Tailscale state directory.\n- What: reset both tailscale funnel and tailscale serve state after tailscale comes online, then reapply the current template-managed mode when configured.\n- How: add explicit reset commands before the Serve/Funnel capability check and before issuing any new serve or funnel command.\n- Source: cherry-picked from b90ca2f.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🧹 PR Test Plugin Cleaned UpThe test plugin and associated files for this PR have been removed from the preview environment. 🤖 This comment is automatically generated when a PR is closed. |
Summary
7.2tailscale upTailscale Serve = Nofrom keeping stale funnel exposure after restartRoot cause
The container hook persisted serve/funnel state in the Tailscale state directory. When a user changed the Docker template from
FunnelorServetoNo, the related env vars disappeared, but the hook never cleared the old state before startup completed.Source
Cherry-picked from
b90ca2f2c9df90bdaca71e3a1a2984b46e83246c/ PR #2600.Verification
bash -n share/docker/tailscale_container_hook