use empty string as cgroup path to grab first find

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 78045a5419718ba8884ed5afc0b41a3a80afc3b4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b66c7ad62ebff12112318db0d1ed48b14f817efa
Component: engine
This commit is contained in:
Andrew Hsu
2018-12-06 18:49:51 +00:00
committed by Sebastiaan van Stijn
parent 42b5bd7c0f
commit c9df8f4688
2 changed files with 2 additions and 2 deletions

View File

@ -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
}

View File

@ -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)