From 78045a5419718ba8884ed5afc0b41a3a80afc3b4 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 --- daemon/daemon_unix.go | 2 +- pkg/sysinfo/sysinfo_linux.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index b18fca17c7..aaeeabb0b5 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -1484,7 +1484,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/pkg/sysinfo/sysinfo_linux.go b/pkg/sysinfo/sysinfo_linux.go index 6492a1c9ac..1fcf08310c 100644 --- a/pkg/sysinfo/sysinfo_linux.go +++ b/pkg/sysinfo/sysinfo_linux.go @@ -232,7 +232,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)