diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-05-11 20:27:29 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-05-13 10:48:17 +0200 |
commit | 0e8f4ddaa93b12ca02a94a0624f38416f0f75e4e (patch) | |
tree | 3adc603813aded145c84edfba975f29e74a1caf4 /cmd/podman/libpodruntime | |
parent | 42e65c57c28ae621ce0b75cd0bb0a9fecba1434c (diff) | |
download | podman-0e8f4ddaa93b12ca02a94a0624f38416f0f75e4e.tar.gz podman-0e8f4ddaa93b12ca02a94a0624f38416f0f75e4e.tar.bz2 podman-0e8f4ddaa93b12ca02a94a0624f38416f0f75e4e.zip |
rootless: default --cgroup-manager=systemd in unified mode
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'cmd/podman/libpodruntime')
-rw-r--r-- | cmd/podman/libpodruntime/runtime.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go index b533dc056..b8d77602d 100644 --- a/cmd/podman/libpodruntime/runtime.go +++ b/cmd/podman/libpodruntime/runtime.go @@ -107,7 +107,11 @@ func getRuntime(ctx context.Context, c *cliconfig.PodmanCommand, renumber bool, if c.Flags().Changed("cgroup-manager") { options = append(options, libpod.WithCgroupManager(c.GlobalFlags.CGroupManager)) } else { - if rootless.IsRootless() { + unified, err := util.IsCgroup2UnifiedMode() + if err != nil { + return nil, err + } + if rootless.IsRootless() && !unified { options = append(options, libpod.WithCgroupManager("cgroupfs")) } } |