Used `go fmt` rules to migrate away from deprecated functions, for
instance `gofmt -w -s -r 'ioutil.TempDir(a, b) -> os.MkdirTemp(a, b)'`
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Because `sdjournal` library just ignores directories which are not
accessible, `journald` log driver is set as the default for a user who
cannot access the journal. As a result, the user cannot see logs of
containers via `podman logs`.
This change verifies accessibility of journal directories without
the library.
Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
Currently we have users failing to run containers within containers
or on systems without systemd support. This change will give us
better defaults on these systems.
Fixes: https://github.com/containers/common/issues/580
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
The current logic is that, if Podman was built with the systemd
build flag, we will always select systemd cgroups by default.
Then, if we detect no systemd dbus session, we will swap to
cgroupfs. Problem: there are cases where a systemd dbus session
is available, but systemd cgroups don't work - most notably,
rootless mode on cgroups v1 systems. Special-case this so that we
will not try to force systemd mode and break rootless containers.
Fixes https://github.com/containers/podman/issues/6982
Signed-off-by: Matthew Heon <matthew.heon@pm.me>