Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos: remove StandardOutput=syslog, StandardError=syslog lines #95353

Merged
merged 1 commit into from Aug 13, 2020

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Aug 13, 2020

Since systemd 243, docs were already steering users towards using
journal:

systemd/systemd@eedaf7f

systemd 246 will go one step further, it shows warnings for these units
during bootup, and will automatically convert these occurences to
journal
:

[ 6.955976] systemd[1]: /nix/store/hwyfgbwg804vmr92fxc1vkmqfq2k9s17-unit-display-manager.service/display-manager.service:27: Standard output type syslog is obsolete, automatically updating to journal. Please update│······················
your unit file, and consider removing the setting altogether.

So there's no point of keeping syslog here, and it's probably a better
idea to just not set it, due to:

This setting defaults to the value set with DefaultStandardOutput= in
systemd-system.conf(5), which defaults to journal.

Discovered during #94354.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Since systemd 243, docs were already steering users towards using
`journal`:

systemd/systemd@eedaf7f

systemd 246 will go one step further, it shows warnings for these units
during bootup, and will [automatically convert these occurences to
`journal`](systemd/systemd@f3dc6af):

> [    6.955976] systemd[1]: /nix/store/hwyfgbwg804vmr92fxc1vkmqfq2k9s17-unit-display-manager.service/display-manager.service:27: Standard output type syslog is obsolete, automatically updating to journal. Please update│······················
 your unit file, and consider removing the setting altogether.

So there's no point of keeping `syslog` here, and it's probably a better
idea to just not set it, due to:

> This setting defaults to the value set with DefaultStandardOutput= in
> systemd-system.conf(5), which defaults to journal.
Copy link
Member

@picnoir picnoir left a comment

Choose a reason for hiding this comment

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

I'm not familiar with syslog and I was a bit worried this could break some syslog-based setups. I just had a quick look at how syslog is supposed to collect a systemd service output.

According to the journald.conf manpage, it looks like the current way to go is to enable the ForwardToSyslog option. This will make journald spinup a syslog socket to /run/systemd/journald/syslog. As a footnote: our rsyslog module will ingest this socket by default.

Overall, you want your syslog data to be first ingested by the journal. Removing these entries makes sense and is unlikely to break any existing setup.

LGTM

@flokli flokli merged commit f3ba51f into NixOS:master Aug 13, 2020
@flokli flokli deleted the systemd-output-journal branch August 13, 2020 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants