tailscale: don't clean up a running daemon on upgrade #30728
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.45) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 420 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.362
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #30728"
general
weight: 0.35
SuperSandro2000
📦 Package Details
Maintainer: @SuperSandro2000
Description:
tailscaleloses connectivity after a package upgrade. On upgrade,default_postinstruns/etc/init.d/tailscale startwhiletailscaledis already running.start_service()always runstailscaled --cleanupfirst, and that cleans up the running daemon's state:procd then sees unchanged instance data and does not restart the instance. The old daemon keeps running without its
ts-chains and, since 1.102.0, without itstailscale0addresses (tailscale/tailscale@77d2c87). The node still shows as online in the admin console, but it and any advertised subnets are unreachable until/etc/init.d/tailscale restartor a reboot.The maintainers of the GuNanOvO/openwrt-tailscale feed use this init script verbatim. They reproduced the issue with this package as well (GuNanOvO/openwrt-tailscale#170):
| Environment | Package | daemon restarted | tailscale0 address | ts- nft rules |
|---|---|---|---|---|
| OpenWrt 24.10 | official (1.80.3) | no | kept¹ | 12 → 0 |
| OpenWrt 25.12 | official (1.98.3) | no | kept¹ | 12 → 0 |
| OpenWrt 25.12 | official (1.102.3, current master) | no | removed | 12 → 0 |
¹ Builds ≤ 1.100.x only flush the nft chains during
--cleanup. Reachability breaks either way.The changes:
start_service()skips--cleanupwhen the service is already running. A cold start still cleans up leftovers from an unclean shutdown.procd_set_param file /usr/sbin/tailscaledmakes procd restart the instance when the binary changes, so an upgrade actually runs the new daemon.stop_service()toservice_stopped(), so it runs after procd has stopped the daemon instead of while it is still running.PKG_RELEASE is bumped.
---
🧪 Run Testing Details
I tested the patched init script with tailscale 1.104.1, built from the GuNanOvO feed with an identical init script, on a subnet router using
fw_modenftables:startwhile the daemon is running and nothing has changed: same PID; the address andts-chains are kept.startwith changed procd instance data, as after an upgrade: procd restarts the daemon,--cleanupdoesn't touch the live daemon, and the new daemon comes up with its addresses, 6ts-chains and working subnet routing.restart: cleanup runs after the daemon has exited, and everything comes back.procd_set_param filedoesn't restart the instance on an unchangedstart, but does once the file's contents change.I haven't built or tested this exact package from this tree.
---
✅ Formalities
🤖 Generated with Claude Code