Skip to content

Unexpected default LogDriver on rootless containers when PID listings are hidden (hidepid > 0) #2533

Description

@bmenant

This follows this discussion.

The default LogDriver election indirectly depends on func useSystemd() bool. It reads /proc/1/comm and expects its value to equal systemd.

Troubles arise when the host system is hardened to hide PID listings from non-root users. On such system, rootless containers end up with a different LogDriver, despite Systemd and Journald being fully supported.

podman-logs knows how to find its logs, so this may not cause immediate issue. However, with Quadlet containers, which are defacto managed by Systemd, units logs aren’t accessible through journalctl --user (messages’ _UID are set to containers namespaced user ids; not actual user id).

An easy workaround is to specify LogDriver=journald in the quadlet files.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions