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

journald: some issues with --user and persistency #989

Closed
tormath1 opened this issue Mar 27, 2023 · 2 comments
Closed

journald: some issues with --user and persistency #989

tormath1 opened this issue Mar 27, 2023 · 2 comments
Labels
kind/bug Something isn't working

Comments

@tormath1
Copy link
Contributor

tormath1 commented Mar 27, 2023

Description

With recent podman experimentation involving systemd users unit, we started seeing some issues with journald, some of them can be fixed on the Flatcar side others not. This issue is for tracking and referencing purposes.

  1. Permission issues:

Trying to display the journal with --user fails with:

core@localhost ~ $ journalctl --user
No journal files were opened due to insufficient permissions.

PR:

  1. Can't display the logs for a given unit with --user:

When creating a user unit, you can display logs of the unit with systemctl --user status foo.service or journalctl --user-unit foo.service but not with journalctl --user --unit foo.service. The is reported upstream: systemd/systemd#26742 (see also: flatcar-archive/flatcar-docs#295)

That works fine by creating a user in the systemd-journal (doc: flatcar-archive/flatcar-docs#297)

  1. First journal is not persisted:

Starting from alpha-3549.0.0, the first journal logs is not persisted: if you boot 2 times, you'll get only 1 journal entry.

We need to create /sysroot/var/log/journal with correct permissions to get it persisted.

PR:

@tormath1 tormath1 added the kind/bug Something isn't working label Mar 27, 2023
@pothos
Copy link
Member

pothos commented Apr 4, 2023

All fixes are in, I think we can close this, assuming that the docs PR for user session logs gets merged

@tormath1
Copy link
Contributor Author

tormath1 commented Apr 5, 2023

Closing this. All fixes should be available in the next Alpha - thanks @pothos for helping on this topic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants