os-tailscale: pre-auth key is not used when tailscaled.state is missing or holds a stale profile
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start by reading the rc.conf.d/tailscaled logic described in the issue and compare its state-file check with the proposed tailscale status --json check after the daemon starts. Trace how service startup builds the tailscale up arguments for missing state and a logged-out profile. Done means a configured pre-auth key is used in both cases, while an already logged-in node does not reuse it.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- The title contains the plugin to which this issue belongs
Describe the bug
Since #5047, rc.conf.d/tailscaled passes --auth-key only when tailscaled.state exists and has no "_current-profile":
if [ -f /var/db/tailscale/tailscaled.state ]; then
if ! grep -q '"_current-profile"' /var/db/tailscale/tailscaled.state; then
tailscaled_up_args_ext="--auth-key=..."
fi
fi
That fixed the key being reused at boot (#4661), but leaves two cases where a valid, unused pre-auth key is never passed to tailscale up:
- No state file yet. The rc script reads its config before tailscaled creates
tailscaled.state, so the first start runstailscale upwithout--auth-key. It prints a login URL and times out ("timeout waiting for Tailscale service to enter a Running state"). A second start then passes the key and joins. - Stale profile. Removing the plugin leaves
/var/db/tailscalein place. If the node was then deleted from the tailnet, the old profile is still intailscaled.state. After reinstalling the plugin and setting a new pre-auth key, the key is never passed;tailscale statusshowsLogged out., and Services start/restart returnsError (1). Recovery needs a shell: stop tailscaled, movetailscaled.stateandprofile-dataaside, then start twice (case 1).
To Reproduce
Case 2:
- Install os-tailscale, set a pre-auth key, enable, and let the node join.
- Delete the node from the tailnet in the admin console.
- Remove the os-tailscale plugin, then install it again.
- Generate a new, unused pre-auth key, set it under VPN › Tailscale › Authentication, enable and apply.
tailscale statusshowsLogged out.; the node never joins.
Case 1:
- With tailscaled stopped, move
/var/db/tailscale/tailscaled.stateaside. - Start the service:
tailscale upruns without--auth-keyand prints a login URL. - Start it again: it joins with the configured key.
Expected behavior
When a pre-auth key is configured and tailscaled is not logged in, tailscale up uses the key. That includes a missing state file, and a profile that is logged out or whose node no longer exists. For example, decide on tailscale status --json (BackendState = NeedsLogin) after tailscaled starts, instead of grepping the state file before it starts.
Describe alternatives you considered
- Keep the grep, but also pass the key when the state file does not exist (fixes case 1 only).
- Remove
/var/db/tailscalewhen the plugin is removed, or offer a "reset node state" action (helps case 2).
Environment
OPNsense 26.1.11_10 (amd64)
os-tailscale 1.4
tailscale 1.98.5_1
- Ngôn ngữ chính
- PHP
- Star
- 1.2k
- Fork
- 932
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của opnsense/plugins
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
www/squid: configctl proxy stop returns before Squid exits, so stop+start (e.g. Monit restart) failsĐang mởsupport
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
opnsense/plugins#5983 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
net/haproxy: IPv6 literal in real server "Source address" generates an invalid `source` directiveCó thể đã có người làm @fraenki đã nhận 6 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
opnsense/plugins#5973 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[dns/ddclient] Support hiding unused standard fields per service (optional_hiding)Có thể đã có người làm @bringha1 đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của opnsense/plugins
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/blocks-engine#7881 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
iruzen-dono/workless#117 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
magicsunday/webtrees-docker#285 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Flaky browser test: AreaHeadersTest 'shows Counting on the way while deferred tab counts load'Đang mởarea/tests type/bug when/soon
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
WP-CLI 3.0 fixes the cron lock and core download bugs described in the handbookCó thể đã có người làm @mayankmajeji đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
WordPress/hosting-handbook#521 ·