Skip to content
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

kubelet: new kubelet config option for disabling group oom kill #126096

Merged

Conversation

utam0k
Copy link
Member

@utam0k utam0k commented Jul 15, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

There is a difference in the OOM behavior between cgroup v1 and v2 by default. It's important to note that in cgroup v1 if one of the processes within a container is killed, the other processes will remain running. Ideally, we might want to align with cgroup v2's behavior, where all processes within a container are killed if an OOM event occurs. However, in reality, we need to maintain the behavior of cgroup v1 for the time being. Therefore, this pull request will introduce the singleProcessOOMKill flag to enable like cgroup v1's behavior in cgroup v2.

Appearently, this workaround has already been discussed in a SIG-Node meeting.
#117793 (comment)

Which issue(s) this PR fixes:

Carry: #122813 by @tzneal

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Added `singleProcessOOMKill` flag to the kubelet configuration. Setting that to true enable single process OOM killing in cgroups v2. In this mode, if a single process is OOM killed within a container, the remaining processes will not be OOM killed.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 15, 2024
@k8s-ci-robot k8s-ci-robot added area/code-generation area/kubelet area/test kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 15, 2024
@utam0k utam0k force-pushed the support-disabling-oom-group-kill branch from 12311ee to 6e7d175 Compare July 15, 2024 06:43
@utam0k utam0k marked this pull request as ready for review July 15, 2024 06:45
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 15, 2024
@k8s-ci-robot k8s-ci-robot requested a review from liggitt July 15, 2024 06:45
@utam0k utam0k marked this pull request as draft July 15, 2024 06:54
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 15, 2024
@utam0k utam0k force-pushed the support-disabling-oom-group-kill branch from 6e7d175 to 00f4125 Compare July 15, 2024 12:01
@utam0k utam0k marked this pull request as ready for review July 18, 2024 12:04
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 18, 2024
@k8s-ci-robot k8s-ci-robot requested a review from kannon92 July 18, 2024 12:04
@roycaihw
Copy link
Member

roycaihw commented Nov 7, 2024

/lgtm
/approve

Waiting for the test result: #126096 (comment)
(the pull-kubernetes-node-kubelet-serial-containerd job takes 90min to finish...)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 7, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 02a3d5adf9dd34dc0ccf88bb694342898a14d5b9

@roycaihw
Copy link
Member

roycaihw commented Nov 7, 2024

pull-kubernetes-node-kubelet-serial-containerd passed

/assign @liggitt
for approval

@utam0k utam0k force-pushed the support-disabling-oom-group-kill branch from 8b0051c to 51ff07f Compare November 7, 2024 01:57
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 7, 2024
@utam0k
Copy link
Member Author

utam0k commented Nov 7, 2024

/test pull-kubernetes-node-kubelet-serial-containerd

I believe it will pass.

Copy link
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/hold for a nit on config field godoc to align with the yaml values users will specify, and one fix needed on the build tagging

staging/src/k8s.io/kubelet/config/v1beta1/types.go Outdated Show resolved Hide resolved
staging/src/k8s.io/kubelet/config/v1beta1/types.go Outdated Show resolved Hide resolved
staging/src/k8s.io/kubelet/config/v1beta1/types.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 7, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dchen1107, liggitt, roycaihw, SergeyKanzhelev, utam0k, yujuhong

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 7, 2024
@utam0k utam0k force-pushed the support-disabling-oom-group-kill branch from 51ff07f to 4f909c1 Compare November 7, 2024 03:04
@utam0k
Copy link
Member Author

utam0k commented Nov 7, 2024

/test pull-kubernetes-node-kubelet-serial-containerd

@utam0k
Copy link
Member Author

utam0k commented Nov 7, 2024

@liggitt Thanks for your review. I've updated following your suggestions.

@liggitt
Copy link
Member

liggitt commented Nov 7, 2024

/lgtm
/hold cancel

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Nov 7, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1434b7ecb2606f35843efb840e693f15a8685a68

@utam0k
Copy link
Member Author

utam0k commented Nov 7, 2024

/test pull-kubernetes-unit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/code-generation area/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: API review completed, 1.32
Archived in project
Status: Done
Development

Successfully merging this pull request may close these issues.