-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix getting cgroup pids #36551
Fix getting cgroup pids #36551
Conversation
awesome!! |
} | ||
systemContainers = append(systemContainers, cont) | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this else block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Thanks, done.
return libcontainercgroups.GetPids(dir) | ||
} | ||
|
||
func getCgroupPath(cgroupPath string) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add documents for getCgroupPath and getCgroupParentPath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -0,0 +1,73 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I'd prefer cgroups logic to be contained inside pkg/kubelet/cm/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That creates a circular dependency, since pkg/kubelet/cm/
depends on pkg/util/oom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I don't have a strong opinion on where the package is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
} | ||
systemContainers = append(systemContainers, cont) | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
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