Commit Graph

10 Commits

Author SHA1 Message Date
Oleksandr Redko ba4c7c98bb chore: remove outdated build constraints
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-03 22:56:00 +02:00
Valentin Rothberg e17483b871 bump to golangci-lint v1.50.0
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>
2022-10-17 15:03:07 +02:00
Kir Kolyshkin 4d8c8a7972 .golangci.yml: add systemd build tag
And fix the found warnings:

	pkg/config/systemd.go:61:3: S1023: redundant `return` statement (gosimple)
			return
			^
	pkg/config/systemd.go:85:3: S1023: redundant `return` statement (gosimple)
			return
			^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-04-11 17:10:47 -07:00
Valentin Rothberg 095aded91c go fmt: use go 1.18 conditional-build syntax
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-18 11:04:40 +01:00
Hironori Shiina e5204aef82 Check accessibility to journal without sdjournal library
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>
2021-11-30 21:24:53 -05:00
Daniel J Walsh 4c61660bf5 Switch default logdriver and eventslogger to journald, if root
This will fix hte eventslog and log files from growing huge,
Lets journald handling rolling logs.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-09 11:54:46 -04:00
Valentin Rothberg 1398d585e4 pkg/config: fix systemd compile errors
The errors sneaked through CI as we didn't use the systemd build tag for
testing.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-27 13:49:55 +02:00
Daniel J Walsh 4c654f7ac2 Don't use systemd defaults if /proc/1/comm != systemd
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>
2021-05-26 15:08:14 -04:00
Matthew Heon 4229e03e6d Ensure that rootless cgroupsv1 will select cgroupfs
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>
2020-07-21 16:15:50 -04:00
Daniel J Walsh caf7fd95ca Only default to systemd if built with the systemd buildtag
For packages that don't ship with systemd, this changes the default for those distros.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-31 12:57:32 -04:00