Merge pull request #68816 from FengyunPan2/cgroup-info

Add helpful log for checking cgrop path
pull/58/head
k8s-ci-robot 2018-09-26 18:10:46 -07:00 committed by GitHub
commit 0ca25b8db7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -255,6 +255,7 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool {
// once resolved, we can remove this code.
whitelistControllers := sets.NewString("cpu", "cpuacct", "cpuset", "memory", "systemd")
var missingPaths []string
// If even one cgroup path doesn't exist, then the cgroup doesn't exist.
for controller, path := range cgroupPaths {
// ignore mounts we don't care about
@ -262,10 +263,15 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool {
continue
}
if !libcontainercgroups.PathExists(path) {
return false
missingPaths = append(missingPaths, path)
}
}
if len(missingPaths) > 0 {
glog.V(4).Infof("The Cgroup %v has some missing paths: %v", name, missingPaths)
return false
}
return true
}