Ignore cgroup2 mountpoints
Our current cgroup parsing logic assumes cgroup v1 mounts so we should ignore cgroup2 mounts for now Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
5d93fed3d2
commit
e7b57cb042
|
@ -149,7 +149,7 @@ func getCgroupMountsHelper(ss map[string]bool, mi io.Reader, all bool) ([]Mount,
|
||||||
if sepIdx == -1 {
|
if sepIdx == -1 {
|
||||||
return nil, fmt.Errorf("invalid mountinfo format")
|
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
|
continue
|
||||||
}
|
}
|
||||||
fields := strings.Split(txt, " ")
|
fields := strings.Split(txt, " ")
|
||||||
|
|
Loading…
Reference in New Issue