diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-12 22:50:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 22:50:19 +0100 |
commit | 6aefbf1216fc1173bf0eab4c021054bebeba0a6a (patch) | |
tree | c3fdeafbd5bf425de310f4f59281f2323e8e682f | |
parent | 3f0661639c3ef3b18e4437f00075352df0af6cee (diff) | |
parent | 194d14ca2fd78e0e7f390adafd7774b6e848bb25 (diff) | |
download | podman-6aefbf1216fc1173bf0eab4c021054bebeba0a6a.tar.gz podman-6aefbf1216fc1173bf0eab4c021054bebeba0a6a.tar.bz2 podman-6aefbf1216fc1173bf0eab4c021054bebeba0a6a.zip |
Merge pull request #12834 from giuseppe/fix-systemd-session-warning
libpod: fix check for systemd session
-rw-r--r-- | libpod/runtime.go | 3 | ||||
-rw-r--r-- | test/system/250-systemd.bats | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index 9794b3605..3297b1ddd 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -170,7 +170,6 @@ func NewRuntime(ctx context.Context, options ...RuntimeOption) (*Runtime, error) if err != nil { return nil, err } - conf.CheckCgroupsAndAdjustConfig() return newRuntimeFromConfig(ctx, conf, options...) } @@ -228,6 +227,8 @@ func newRuntimeFromConfig(ctx context.Context, conf *config.Config, options ...R return nil, err } + runtime.config.CheckCgroupsAndAdjustConfig() + return runtime, nil } diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats index c49727cc9..c47679904 100644 --- a/test/system/250-systemd.bats +++ b/test/system/250-systemd.bats @@ -276,4 +276,9 @@ LISTEN_FDNAMES=listen_fdnames" | sort) is "$output" ".*--template cannot be set" "Error message should be '--template requires --new'" } +@test "podman --cgroup=cgroupfs doesn't show systemd warning" { + DBUS_SESSION_BUS_ADDRESS= run_podman --log-level warning --cgroup-manager=cgroupfs info -f '' + is "$output" "" "output should be empty" +} + # vim: filetype=sh |