From c9df8f468850a27eaaa1ca72d07b283635c690e7 Mon Sep 17 00:00:00 2001 From: Andrew Hsu Date: Thu, 6 Dec 2018 18:49:51 +0000 Subject: [PATCH] use empty string as cgroup path to grab first find Signed-off-by: Andrew Hsu Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 78045a5419718ba8884ed5afc0b41a3a80afc3b4) Signed-off-by: Sebastiaan van Stijn Upstream-commit: b66c7ad62ebff12112318db0d1ed48b14f817efa Component: engine --- components/engine/daemon/daemon_unix.go | 2 +- components/engine/pkg/sysinfo/sysinfo_linux.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/engine/daemon/daemon_unix.go b/components/engine/daemon/daemon_unix.go index b69eede21c..5234201c82 100644 --- a/components/engine/daemon/daemon_unix.go +++ b/components/engine/daemon/daemon_unix.go @@ -1480,7 +1480,7 @@ func (daemon *Daemon) initCgroupsPath(path string) error { // for the period and runtime as this limits what the children can be set to. daemon.initCgroupsPath(filepath.Dir(path)) - mnt, root, err := cgroups.FindCgroupMountpointAndRoot("cpu") + mnt, root, err := cgroups.FindCgroupMountpointAndRoot("", "cpu") if err != nil { return err } diff --git a/components/engine/pkg/sysinfo/sysinfo_linux.go b/components/engine/pkg/sysinfo/sysinfo_linux.go index dde5be19bc..bc295dd3ef 100644 --- a/components/engine/pkg/sysinfo/sysinfo_linux.go +++ b/components/engine/pkg/sysinfo/sysinfo_linux.go @@ -227,7 +227,7 @@ func checkCgroupCpusetInfo(cgMounts map[string]string, quiet bool) cgroupCpusetI // checkCgroupPids reads the pids information from the pids cgroup mount point. func checkCgroupPids(quiet bool) cgroupPids { - _, err := cgroups.FindCgroupMountpoint("pids") + _, err := cgroups.FindCgroupMountpoint("", "pids") if err != nil { if !quiet { logrus.Warn(err)