-
Notifications
You must be signed in to change notification settings - Fork 49
journald: some issues with --user and persistency #989
Description
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.
- 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:
- dracut/99setup-root: change owner of /run/log/journal bootengine#59
- sys-kernel/bootengine: fix journalctl --user issue flatcar-archive/coreos-overlay#2553
- journald: add examples to show user journal logs flatcar-archive/flatcar-docs#297
- 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)
- 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: