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

do not touch swap for cgroup v1 if not available #119486

Merged
merged 2 commits into from Jul 24, 2023

Conversation

pacoxu
Copy link
Member

@pacoxu pacoxu commented Jul 21, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #119467 #119446

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. 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. labels Jul 21, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Jul 21, 2023
@pacoxu
Copy link
Member Author

pacoxu commented Jul 21, 2023

/test pull-kubernetes-e2e-ubuntu-gce-network-policies

@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 21, 2023
@pacoxu
Copy link
Member Author

pacoxu commented Jul 21, 2023

/test pull-kubernetes-e2e-ubuntu-gce-network-policies

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 21, 2023
@pacoxu
Copy link
Member Author

pacoxu commented Jul 21, 2023

/test pull-kubernetes-e2e-ubuntu-gce-network-policies

@k8s-ci-robot k8s-ci-robot added the area/dependency Issues or PRs related to dependency changes label Jul 21, 2023
@pacoxu
Copy link
Member Author

pacoxu commented Jul 21, 2023

@k8s-ci-robot
Copy link
Contributor

@pacoxu: GitHub didn't allow me to request PR reviews from the following users: iholder101.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @iholder101 @mrunalp @SergeyKanzhelev @bart0sh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pacoxu
Copy link
Member Author

pacoxu commented Jul 21, 2023

/priority critical-urgent
for triage

@k8s-ci-robot k8s-ci-robot added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 21, 2023
@pacoxu
Copy link
Member Author

pacoxu commented Jul 21, 2023

/test pull-kubernetes-e2e-gci-gce-ipvs
/test pull-kubernetes-e2e-gci-gce-ingress

@pacoxu pacoxu changed the title do not touch swap for cgroup v1 do not touch swap for cgroup v1 if not available Jul 21, 2023
Copy link
Contributor

@mrunalp mrunalp left a comment

Choose a reason for hiding this comment

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

/lgtm

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

LGTM label has been added.

Git tree hash: 468b0780371b45c7c3d6ecb6bcae9ec00f2f3cc2

@harche
Copy link
Contributor

harche commented Jul 21, 2023

@pacoxu Thanks for this PR, can you send your fixes in containerd repo as well? That way when they cut a new release of the containerd with your changes, we can bump it up in k8s.

@pacoxu
Copy link
Member Author

pacoxu commented Jul 21, 2023

/assign @dims @liggitt
for vendor update

@pacoxu
Copy link
Member Author

pacoxu commented Jul 21, 2023

@pacoxu Thanks for this PR, can you send your fixes in containerd repo as well? That way when they cut a new release of the containerd with your changes, we can bump it up in k8s.

let me check the containerd fix.

@mqasimsarfraz
Copy link

mqasimsarfraz commented Jul 22, 2023

@pacoxu Thanks for this PR, can you send your fixes in containerd repo as well? That way when they cut a new release of the containerd with your changes, we can bump it up in k8s.

let me check the containerd fix.

@pacoxu There is a fix in place for containerd already, containerd/containerd#8857. Please feel free to review it!

@iholder101
Copy link
Contributor

LGTM

@bart0sh bart0sh added this to Triage in SIG Node PR Triage Jul 23, 2023
@pacoxu
Copy link
Member Author

pacoxu commented Jul 24, 2023

@dims @liggitt Do you have time to take a look?

@dims
Copy link
Member

dims commented Jul 24, 2023

/approve
/lgtm
/milestone v1.28

fixes failures in our CI jobs for a bug that certainly show up in real world scenarios as well.

@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jul 24, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, mrunalp, pacoxu

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 Jul 24, 2023
@k8s-ci-robot k8s-ci-robot merged commit d25c0a1 into kubernetes:master Jul 24, 2023
15 of 16 checks passed
SIG Node PR Triage automation moved this from Triage to Done Jul 24, 2023
@mqasimsarfraz
Copy link

@pacoxu Thanks for this PR, can you send your fixes in containerd repo as well? That way when they cut a new release of the containerd with your changes, we can bump it up in k8s.

let me check the containerd fix.

@pacoxu There is a fix in place for containerd already, containerd/containerd#8857. Please feel free to review it!

The fixes were backported and are available in stable releases:

@pacoxu
Copy link
Member Author

pacoxu commented Jul 28, 2023

The fixes were backported and are available in stable releases:

Thanks for the update.

containerd/containerd#8857 (comment)

We may bump containerd later.

// Some swapping is still possible.
// Note that if memory limit is 0, memory swap limit is ignored.
lcr.MemorySwapLimitInBytes = lcr.MemoryLimitInBytes
if swapControllerAvailable() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: Should this not be checked regardless of whether unified mode is enabled. Otherwise we explicitly set memory.swap.max even if swap is disabled?

For reference, I am having issues launching a >= 1.28.0 using kind on a node where swap is disabled. (I will spend some time creating an issue tomorrow).

cc @iholder101

Copy link
Member Author

Choose a reason for hiding this comment

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

Is this fix a problem? I cannot catch up with you here.

This added a check for no-cgroup v2: to not set swap if swap controller is not available.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this fix is fine. I was asking whether this check should also be done on cgroup v2 systems. I have a PR #120784 under review to do this -- effectively moving the check higher up the call chain.

Feel free to review this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/dependency Issues or PRs related to dependency changes area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Archived in project
9 participants