Skip to content

Commit

Permalink
Don't support cgroupns on cgroups v1
Browse files Browse the repository at this point in the history
Fixes #4108

Signed-off-by: Mark Yen <mark.yen@suse.com>
(cherry picked from commit d48bf06)
Signed-off-by: Justin Chadwell <me@jedevc.com>
  • Loading branch information
mook-as authored and jedevc committed Oct 13, 2023
1 parent 1f9ad6c commit 5f72472
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions executor/oci/spec_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 5f72472

Please sign in to comment.