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/oci-containers: restore ability to easily view the container output in the logs #102769

Merged
merged 1 commit into from Jul 5, 2021

Conversation

r-vdp
Copy link
Contributor

@r-vdp r-vdp commented Nov 4, 2020

Motivation for this change

Resolves #102768.
Allows the usage of journalctl -u to easily view the logs for a container managed by this module.

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.

@SuperSandro2000
Copy link
Member

Please do not merge master into a PR.

@r-vdp
Copy link
Contributor Author

r-vdp commented Feb 17, 2021

@SuperSandro2000 Alright, sorry, I was trying to get the PR to apply cleanly.

Should I then rebase on top of the master branch instead and force push? Or what is the best practice here?

@SuperSandro2000
Copy link
Member

Should I then rebase on top of the master branch instead and force push?

Yes, please.

…tput in the logs

Fixes NixOS#102768.
Allows the usage of `journalctl -u` to easily view the logs for a container managed by this module.
@r-vdp
Copy link
Contributor Author

r-vdp commented Feb 18, 2021

Should I then rebase on top of the master branch instead and force push?

Yes, please.

Done!

@r-vdp
Copy link
Contributor Author

r-vdp commented Mar 16, 2021

@SuperSandro2000 what would be required still to get this PR merged?

@zowoq zowoq merged commit 14d2192 into NixOS:master Jul 5, 2021
@r-vdp r-vdp deleted the patch-1 branch July 22, 2022 09:06
@pecigonzalo
Copy link

👋🏼 I was just looking at why my NixOS system had double logs for my containers. I traced it back to this change, as we now print both as container (due to log-driver=journald) and as the service (due to the changes made in this PR).

I agree with the nice to have of being able to do journalctl -u <servicename> but logging to journald twice is not so good. I would propose that we we change the default logging driver then and keep this.

If you agree, I can create a PR with the change.
Thanks!

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.

OCI containers output in systemd journal
4 participants