-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
kubeadm: update swap warning for v1.28 change #120198
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
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.
/approve
cmd/kubeadm/app/preflight/checks.go
Outdated
@@ -653,7 +653,7 @@ func (swc SwapCheck) Check() (warnings, errorList []error) { | |||
} | |||
|
|||
if len(buf) > 1 { | |||
return []error{errors.New("swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet")}, nil | |||
return []error{errors.New("swap is supported for cgroup v2 only; the NodeSwap feature gate of the kubelet is beta but disabled by default, and better keep it off")}, nil |
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.
return []error{errors.New("swap is supported for cgroup v2 only; the NodeSwap feature gate of the kubelet is beta but disabled by default, and better keep it off")}, nil | |
return []error{errors.New("swap is supported for cgroup v2 only; the NodeSwap feature gate of the kubelet is beta but disabled by default")}, nil | |
i think we can just say this part and let the user decide |
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.
/hold
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.
pls let this pr hold for an while to wait for @pacoxu to address this comment.
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.
Thanks @chendave. Updated.
Thanks @pacoxu! |
LGTM label has been added. Git tree hash: e0a0657ad15e9c602ef5c8f7cfe9c25954db6e1b
|
/test pull-kubernetes-verify-strict-lint not required, just see is there any suggestion for the lint job. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: iholder101, neolit123, 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 |
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.
/hold cancel
/test pull-kubernetes-e2e-gce |
Is this change visible to people who use Kubernetes? If it is, we should add a changelog entry. |
this just update the error msg, no behavior change I think. /lgtm |
LGTM label has been added. Git tree hash: a024d8c8b6487024f23aa07efb037fe714b75637
|
Yes. A release note may help(but just a warning message update is a tiny changelog.) |
/unhold |
Changelog suggestion kubeadm: updated warning message when swap space is detected. When swap is active on Linux, kubeadm explains that swap is supported for cgroup v2 only and is beta but disabled by default. |
Thanks @sftim. Updated. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
We have mentioned the steps to enable Swap with kubeadm in the blog: https://kubernetes.io/blog/2023/08/24/swap-linux-beta/#set-up-a-kubernetes-cluster-that-uses-swap-enabled-nodes.
Note that NodeSwap is supported for cgroup v2 only. For Kubernetes v1.28, using swap along with cgroup v1 is no longer supported.
Since 1.28, the FG is beta but disabled by default. I prefer to keep the warning and update it accordingly.
Which issue(s) this PR fixes:
xref kubernetes/kubeadm#2563
Special notes for your reviewer:
Does this PR introduce a user-facing change?