Force reauthentication when tailscale explicitly complains about login server change#673
Force reauthentication when tailscale explicitly complains about login server change#673lmagyar wants to merge 6 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughWait for additional backend states (including a transient Changes
Sequence Diagram(s)sequenceDiagram
participant S6 as s6 startup script
participant TSd as tailscaled
participant CLI as /opt/tailscale
participant Backend as Tailscale backend
S6->>TSd: poll BackendState until in {NoState (30s), Stopped, NeedsLogin, NeedsMachineAuth, Running}
S6->>CLI: run `/opt/tailscale up` with options
CLI-->>S6: stdout + stderr (stderr captured)
alt stderr contains "can't change --login-server without --force-reauth"
S6->>S6: add `--force-reauth` to options
S6->>CLI: retry `/opt/tailscale up --force-reauth`
CLI-->>S6: stdout/stderr (success or fail)
else other failure
CLI-->>S6: error (script exits)
end
S6->>Backend: wait until BackendState == "Running"
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run`:
- Around line 103-105: The readiness loop conflates socket existence with
successful backend-state probes; modify the loop so it first waits for
bashio::fs.socket_exists "/var/run/tailscale/tailscaled.sock" to be true, then
separately poll /opt/tailscale status --json --peers=false --self=false and pipe
to jq '.BackendState == "Starting"' retrying on probe failures, and only exit
the loop when a probe succeeds and returns false (i.e., BackendState !=
"Starting"); ensure transient failures from the status/jq pipeline do not cause
the loop to break and delay proceeding to the next step (e.g., the tailscale up
invocation) until a successful non-Starting state is observed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6b4c3705-be06-4a14-b8ff-969930621b79
📒 Files selected for processing (1)
tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run
Proposed Changes
Solution for "login server change" and "we must add --force-reauth to tailscale up" issue:
Positive side-effects:
Related Issues
fixes #643 #546
Summary by CodeRabbit