Skip to content

Add log_upload config option to configure log upload separately from local app log level#681

Open
lmagyar wants to merge 3 commits intohassio-addons:mainfrom
lmagyar:pr-log-upload
Open

Add log_upload config option to configure log upload separately from local app log level#681
lmagyar wants to merge 3 commits intohassio-addons:mainfrom
lmagyar:pr-log-upload

Conversation

@lmagyar
Copy link
Copy Markdown
Collaborator

@lmagyar lmagyar commented May 3, 2026

Proposed Changes

It was previously an ugly solution: to enable log upload, users should also enable detailed debug level logging locally.

Related Issues

fixes #674

Summary by CodeRabbit

  • New Features

    • Added a new "Log upload" configuration option to control Tailscale client log uploads to log.tailscale.com (disabled by default).
  • Documentation

    • Updated configuration documentation to reflect the new log upload option and clarified log level behavior.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

Warning

Rate limit exceeded

@lmagyar has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 48 minutes and 7 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0f6f97f6-d0dc-48e2-a0f9-7107c16ad9ac

📥 Commits

Reviewing files that changed from the base of the PR and between da70f58 and e3c8861.

📒 Files selected for processing (2)
  • tailscale/DOCS.md
  • tailscale/translations/en.yaml

Walkthrough

This PR introduces a user-configurable log_upload option to the Tailscale addon. It replaces the implicit control of log upload behavior (previously tied to debug mode) with an explicit configuration setting, allowing users to enable Tailscale network logging when required by the Admin Console without breaking addon startup.

Changes

Log Upload Configuration Control

Layer / File(s) Summary
Configuration Schema
tailscale/config.yaml
New options.log_upload setting added with default false, and schema updated to validate log_upload as boolean.
Runtime Logic
tailscale/rootfs/etc/s6-overlay/s6-rc.d/tailscaled/run, tailscale/rootfs/etc/s6-overlay/s6-rc.d/init-magicdns-proxies-upstream-list/run
Daemon and DNS init scripts updated to check bashio::config.true "log_upload" and bashio::config.false "log_upload" instead of debug-mode conditionals to control log server inclusion and --no-logs-no-support flag.
Documentation & Translations
tailscale/DOCS.md, tailscale/translations/en.yaml
Configuration example and docs updated to show log_upload: false default; new log_upload option documented with description of client log upload behavior; translation entry added for UI display.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

bugfix

Suggested reviewers

  • frenck

Poem

🐰 A config flag hops into view,
No more debug tricks—just log_upload: true!
Logs flow freely when admins demand,
While the daemon runs smooth across all the land.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a new log_upload config option to decouple log upload configuration from the local app log level setting.
Linked Issues check ✅ Passed The PR fully addresses issue #674 by implementing a dedicated log_upload config option that enables Tailscale log upload independently, allowing users to enable Admin Console network logs without requiring local debug logging.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the log_upload configuration option across documentation, config schema, scripts, and translations with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 48 minutes and 7 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tailscale/DOCS.md (1)

229-233: ⚡ Quick win

Add a one-line “when required” hint for log_upload.

Consider explicitly noting that users must set log_upload: true when Tailscale Admin Console network logs are enabled, to avoid tailscaled startup refusal. This directly connects the option to the real failure mode users hit.

Suggested doc tweak
 ### Option: `log_upload`
 
 Controls Tailscale's client log upload to log.tailscale.com.
+Enable this if your tailnet policy/Admin Console requires client log upload; otherwise tailscaled can refuse to start.
 
 This option is disabled by default.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tailscale/DOCS.md` around lines 229 - 233, Add a one-line “when required”
hint to the Option: `log_upload` section explaining that users must set
log_upload: true when enabling Tailscale Admin Console network logs (otherwise
tailscaled may refuse to start); update the `log_upload` docs to include this
explicit note referencing the option name `log_upload` and the daemon
`tailscaled` so users see the direct connection to the startup failure mode.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@tailscale/DOCS.md`:
- Around line 229-233: Add a one-line “when required” hint to the Option:
`log_upload` section explaining that users must set log_upload: true when
enabling Tailscale Admin Console network logs (otherwise tailscaled may refuse
to start); update the `log_upload` docs to include this explicit note
referencing the option name `log_upload` and the daemon `tailscaled` so users
see the direct connection to the startup failure mode.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 95d4338a-88bc-46b5-ad3b-7b8c8d1aec2f

📥 Commits

Reviewing files that changed from the base of the PR and between 7a10013 and da70f58.

📒 Files selected for processing (5)
  • tailscale/DOCS.md
  • tailscale/config.yaml
  • tailscale/rootfs/etc/s6-overlay/s6-rc.d/init-magicdns-proxies-upstream-list/run
  • tailscale/rootfs/etc/s6-overlay/s6-rc.d/tailscaled/run
  • tailscale/translations/en.yaml

@lmagyar lmagyar added the no-stale This issue or PR is exempted from the stable bot. label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature New features or options. no-stale This issue or PR is exempted from the stable bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tailscale daemon does not start when network logs are enabled in Admin Console

1 participant