summaryrefslogtreecommitdiff
path: root/utils/utils_supported.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/utils_supported.go')
-rw-r--r--utils/utils_supported.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/utils/utils_supported.go b/utils/utils_supported.go
index 7a0417c6c..73313cf5e 100644
--- a/utils/utils_supported.go
+++ b/utils/utils_supported.go
@@ -81,16 +81,9 @@ func getCgroupProcess(procFile string) (string, error) {
cgroup = line[3:]
break
}
- // root cgroup, skip it
- if parts[2] == "/" {
- continue
- }
- // The process must have the same cgroup path for all controllers
- // The OCI runtime spec file allow us to specify only one path.
- if cgroup != "/" && cgroup != parts[2] {
- return "", errors.Errorf("cgroup configuration not supported, the process is in two different cgroups")
+ if len(parts[2]) > len(cgroup) {
+ cgroup = parts[2]
}
- cgroup = parts[2]
}
if cgroup == "/" {
return "", errors.Errorf("could not find cgroup mount in %q", procFile)