macOS: action unconditionally overrides system DNS (networksetup 100.100.100.100), breaking Actions broker resolution and cancelling jobs mid-run
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- github-actions, macos, typescript
- 领域
- ci-cd, devops, networking
调研方向
从 src/main.ts 中的 configureDNSOnMacOS 开始,跟踪 #200 引入的 macOS join 和 post-step 流程。验证相对于 action 的 networksetup 调用,--accept-dns 是如何处理的,然后定义 opt-in 或 --accept-dns=false 的行为以及 DNS 恢复;完成的标准是 action 不再在 job 期间无条件覆盖 runner 的 DNS。
由索引模型根据 Issue 内容生成。
描述
What happens
On a GitHub-hosted macOS runner, a job that connects with tailscale/github-action@v4 and then runs for several minutes gets cancelled ~5 min in with the generic The operation was canceled. Runner diagnostic logs (ACTIONS_RUNNER_DEBUG=true) show repeated job-lease renewal failures:
WARN GitHubActionsService] Attempt N of POST .../renewjob failed (Socket Error: HostNotFound)
ERR JobDispatcher] Catch exception during renew runner job ...
INFO JobDispatcher] Send job cancellation message to worker ...
The Actions broker hostname (run-actions-*.actions.githubusercontent.com) fails to resolve (HostNotFound), so the runner cannot renew its lease and the service cancels the healthy job.
Root cause
On join (macOS only), configureDNSOnMacOS in src/main.ts runs:
networksetup -setdnsservers Ethernet 100.100.100.100
repointing the runner's system DNS at the tailnet resolver, which intermittently fails to forward public queries — so the broker does not resolve, renewjob fails, and the job is cancelled. Three problems:
- Unconditional on macOS — gated only on the tailnet-wide
MagicDNSEnabledflag, not on--accept-dns. Passingargs: --accept-dns=falsedoes not prevent it (that only affectstailscale up, not the action's ownnetworksetupcall). - No input to disable the DNS configuration.
- The action never restores DNS, so the override persists for the whole job.
Introduced by #200.
Impact
Any macOS job that stays up long enough to hit a lease renewal while the tailnet resolver cannot forward the broker query is silently cancelled. Intermittent, so it reads as flaky infrastructure.
Workaround
Revert DNS immediately after the action (safe when you do not need MagicDNS name resolution — reach peers by Tailscale IP):
- run: sudo networksetup -setdnsservers Ethernet Empty
Request
Make the macOS DNS configuration opt-in (or skip it when --accept-dns=false), and/or restore the original DNS in the post step. An input such as set-dns: false would suffice.
Environment
GitHub-hosted macOS (arm64), tailscale/github-action@v4, Tailscale 1.94.2.
- 主要语言
- TypeScript
- 星标
- 938
- 派生
- 137
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tailscale/github-action 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
tailscale/github-action#283 · 1 条评论 · 1 个 reaction ·
-
fr
难度 3/5 1-2 天 新手友好度 68/100
tailscale/github-action#317 ·
-
难度 3/5 1-2 天 新手友好度 48/100
tailscale/github-action#316 · 2 条评论 ·
-
难度 3/5 1-2 天 新手友好度 76/100
tailscale/github-action#313 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 55/100
tailscale/github-action#287 · 7 条评论 ·
查看 tailscale/github-action 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
calcite-components needs triage refactor
难度 2/5 1-3 小时 新手友好度 75/100
Esri/calcite-design-system#15203 ·
-
难度 2/5 1-3 小时 新手友好度 90/100
danielmiessler/LifeOS#2218 ·