Skip to content

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

@tormath1

Description

@tormath1

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions