Skip to content

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

Open
lmagyar wants to merge 4 commits into
hassio-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 4 commits into
hassio-addons:mainfrom
lmagyar:pr-log-upload

Conversation

@lmagyar

@lmagyar lmagyar commented May 3, 2026

Copy link
Copy Markdown
Collaborator

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 the configuration docs with the new Log upload option and clarified how log level affects log suppression.
  • Behavior Updates

    • Updated runtime behavior so log upload disabling is driven by the Log upload setting rather than debug mode.

@coderabbitai

coderabbitai Bot commented May 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 98ed4f70-cb76-4e78-906b-c82a31b2a0ca

📥 Commits

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

📒 Files selected for processing (2)
  • tailscale/DOCS.md
  • tailscale/translations/en.yaml
✅ Files skipped from review due to trivial changes (1)
  • tailscale/translations/en.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • tailscale/DOCS.md

Walkthrough

This PR adds a new log_upload configuration option for Tailscale, updates runtime scripts to use it for log-upload behavior, and refreshes the docs and translation text to match.

Changes

Tailscale log upload control

Layer / File(s) Summary
Configuration contract
tailscale/config.yaml
Adds options.log_upload with a false default and validates it as a boolean in the schema.
Runtime and docs
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/DOCS.md, tailscale/translations/en.yaml
Uses log_upload to control LOG_SERVER inclusion and --no-logs-no-support, and documents the option, its default, and related log-level behavior.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

Suggested labels: bugfix

Suggested reviewers: frenck

Poem

🐰 A tiny flag now hops in place,
To guide log streams at Tailscale’s pace.
No more debug-mode guessing game,
Just log_upload to call the flame.

🚥 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 describes the main change: adding a separate log_upload configuration option.
Linked Issues check ✅ Passed The PR adds config and runtime wiring to enable Tailscale log upload independently of local debug logging, matching #674.
Out of Scope Changes check ✅ Passed The changes stay focused on log_upload docs, config, translations, and startup scripts with no obvious unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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
@markwbennett

Copy link
Copy Markdown

Another data point in favor of merging this: the control-plane rejection can strand a node even when network flow logs are off in the admin console.

One of my nodes (Home Assistant OS, add-on v0.28.1) sat unreachable for 11 days with:

backend error: tailnet requires logging to be enabled. Remove --no-logs-no-support from tailscaled command line.

The admin console's Logs → Network flow logs page showed "Not logging" the entire time I was debugging. Every add-on restart re-registered cleanly (machineAuthorized=true), received a fresh netmap, and then hit the same rejection — so control was still serving the logging requirement while the console showed logging off. This matches tailscale/tailscale#11793, where nodes stay stuck once the capability has ever been present on the tailnet.

Because the flag is hardcoded, the local fix was patching it out of the image with docker commit, which the next add-on update will undo. A log_upload option like this PR's would have avoided both the outage and the patch.

Is there anything blocking this from landing in a release?

Thank you for maintaining the add-on, and for this fix.

@lmagyar

lmagyar commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Because the flag is hardcoded

Currently you can change log_level from info to debug, that will turn off --no-logs-no-support.

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

2 participants