Merge pull request #81086 from dims/fix-incorrect-readlink-check-for-checking-kernel-pids

[TOB-K8S-027] Fix Incorrect isKernelPid check
This commit is contained in:
Kubernetes Prow Robot 2019-08-08 17:58:04 -07:00 committed by GitHub
commit d47f9ff132
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -888,7 +888,7 @@ func ensureSystemCgroups(rootCgroupPath string, manager *fs.Manager) error {
func isKernelPid(pid int) bool {
// Kernel threads have no associated executable.
_, err := os.Readlink(fmt.Sprintf("/proc/%d/exe", pid))
return err != nil
return err != nil && os.IsNotExist(err)
}
func (cm *containerManagerImpl) GetCapacity() v1.ResourceList {