diff --git a/executor/oci/spec_linux.go b/executor/oci/spec_linux.go index cd9912b906be..50121f79064b 100644 --- a/executor/oci/spec_linux.go +++ b/executor/oci/spec_linux.go @@ -150,9 +150,13 @@ func getTracingSocket() string { func cgroupNamespaceSupported() bool { cgroupNSOnce.Do(func() { - if _, err := os.Stat("/proc/self/ns/cgroup"); !os.IsNotExist(err) { - supportsCgroupNS = true + if _, err := os.Stat("/proc/self/ns/cgroup"); os.IsNotExist(err) { + return } + if _, err := os.Stat("/sys/fs/cgroup/cgroup.subtree_control"); os.IsNotExist(err) { + return + } + supportsCgroupNS = true }) return supportsCgroupNS }