summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-05-11 20:27:29 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-05-13 10:48:17 +0200
commit0e8f4ddaa93b12ca02a94a0624f38416f0f75e4e (patch)
tree3adc603813aded145c84edfba975f29e74a1caf4 /cmd
parent42e65c57c28ae621ce0b75cd0bb0a9fecba1434c (diff)
downloadpodman-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')
-rw-r--r--cmd/podman/libpodruntime/runtime.go6
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"))
}
}