summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-01-12 21:15:30 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-01-12 21:18:15 +0100
commit194d14ca2fd78e0e7f390adafd7774b6e848bb25 (patch)
treec3fdeafbd5bf425de310f4f59281f2323e8e682f /libpod
parent3f0661639c3ef3b18e4437f00075352df0af6cee (diff)
downloadpodman-194d14ca2fd78e0e7f390adafd7774b6e848bb25.tar.gz
podman-194d14ca2fd78e0e7f390adafd7774b6e848bb25.tar.bz2
podman-194d14ca2fd78e0e7f390adafd7774b6e848bb25.zip
libpod: fix check for systemd session
move the check after the cgroup manager is set, so to correctly detect --cgroup-manager=cgroupfs and do not raise a warning about dbus not being present. Closes: https://github.com/containers/podman/issues/12802 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime.go3
1 files changed, 2 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
}