runc/ignore_cgroup2_mountpoint.patch

14 lines
550 B
Diff

diff --git a/libcontainer/cgroups/utils.go.orig b/libcontainer/cgroups/utils.go
index 8946dd5..c6db003 100644
--- a/libcontainer/cgroups/utils.go.orig
+++ b/libcontainer/cgroups/utils.go
@@ -149,7 +149,7 @@ func getCgroupMountsHelper(ss map[string]bool, mi io.Reader, all bool) ([]Mount,
if sepIdx == -1 {
return nil, fmt.Errorf("invalid mountinfo format")
}
- if txt[sepIdx+3:sepIdx+9] != "cgroup" {
+ if txt[sepIdx+3:sepIdx+10] == "cgroup2" || txt[sepIdx+3:sepIdx+9] != "cgroup" {
continue
}
fields := strings.Split(txt, " ")