1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

daemon: fail early if rootless && cgroupdriver == "systemd" && cgroup v1

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2020-03-11 12:49:03 +09:00
parent 51c119c698
commit 92e7f8f67c

View file

@ -791,6 +791,10 @@ func verifyDaemonSettings(conf *config.Config) error {
}
}
if conf.Rootless && UsingSystemd(conf) && !cgroups.IsCgroup2UnifiedMode() {
return fmt.Errorf("exec-opt native.cgroupdriver=systemd requires cgroup v2 for rootless mode")
}
if conf.DefaultRuntime == "" {
conf.DefaultRuntime = config.StockRuntimeName
}