diff --git a/executor/oci/spec_unix.go b/executor/oci/spec_unix.go index 97e95e9834b2..4cf13d3928fc 100644 --- a/executor/oci/spec_unix.go +++ b/executor/oci/spec_unix.go @@ -149,9 +149,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 }