Fix getting cgroup pids#36551
Conversation
|
awesome!! |
| return ensureSystemCgroups("/", manager) | ||
| } | ||
| systemContainers = append(systemContainers, cont) | ||
| } else { |
| return libcontainercgroups.GetPids(dir) | ||
| } | ||
|
|
||
| func getCgroupPath(cgroupPath string) (string, error) { |
There was a problem hiding this comment.
nit: add documents for getCgroupPath and getCgroupParentPath
| @@ -0,0 +1,73 @@ | |||
| /* | |||
There was a problem hiding this comment.
nit: I'd prefer cgroups logic to be contained inside pkg/kubelet/cm/
There was a problem hiding this comment.
That creates a circular dependency, since pkg/kubelet/cm/ depends on pkg/util/oom
There was a problem hiding this comment.
@timstclair will a sub-package of cm work? Having all cgroups logic in there will help with code structure.
There was a problem hiding this comment.
Sure, I don't have a strong opinion on where the package is.
| return ensureSystemCgroups("/", manager) | ||
| } | ||
| systemContainers = append(systemContainers, cont) | ||
| } else { |
|
Jenkins GCE e2e failed for commit 585673fb55b4522bcece6fce283876e8de2d393d. Full PR test history. The magic incantation to run this job again is |
|
Jenkins GCI GCE e2e failed for commit 585673fb55b4522bcece6fce283876e8de2d393d. Full PR test history. The magic incantation to run this job again is |
|
Jenkins GCE etcd3 e2e failed for commit 585673fb55b4522bcece6fce283876e8de2d393d. Full PR test history. The magic incantation to run this job again is |
|
Jenkins GCI GKE smoke e2e failed for commit 585673fb55b4522bcece6fce283876e8de2d393d. Full PR test history. The magic incantation to run this job again is |
|
Jenkins GKE smoke e2e failed for commit 585673fb55b4522bcece6fce283876e8de2d393d. Full PR test history. The magic incantation to run this job again is |
|
Jenkins Kubemark GCE e2e failed for commit 585673fb55b4522bcece6fce283876e8de2d393d. Full PR test history. The magic incantation to run this job again is |
585673f to
a2f18e6
Compare
|
Jenkins GCE Node e2e failed for commit 585673fb55b4522bcece6fce283876e8de2d393d. Full PR test history. The magic incantation to run this job again is |
|
Jenkins verification failed for commit a2f18e6. Full PR test history. The magic incantation to run this job again is |
|
Verified OOM tests pass on all images with this fix. |
|
Jenkins unit/integration failed for commit e58108b. Full PR test history. The magic incantation to run this job again is |
e58108b to
3aaa6fc
Compare
|
Squashed commits. I kept the BUILD files in a separate commit for easier cherry-picking to 1.4. Reapplying LGTM. |
|
thanks! |
|
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue |
Automatic merge from submit-queue Fix getting cgroup pids Cherry-pick from #36551 Targetting v1.4.6 ```release-note Fix fetching pids running in a cgroup, which caused problems with OOM score adjustments & setting the /system cgroup ("misc" in the summary API). ```
Automatic merge from submit-queue Fix getting cgroup pids Cherry-pick from kubernetes#36551 Targetting v1.4.6 ```release-note Fix fetching pids running in a cgroup, which caused problems with OOM score adjustments & setting the /system cgroup ("misc" in the summary API). ```
Fixes #35214, #33232
Verified manually, but I didn't have time to run all the e2e's yet (will check it in the morning).
This should be cherry-picked into 1.4, and merged into 1.5 (/cc @saad-ali )
/cc @kubernetes/sig-node
This change is