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

kubeadm: move swap on check error to warning since NodeSwap is beta #104854

Merged
merged 2 commits into from Sep 17, 2021

Conversation

@pacoxu
Copy link
Member

@pacoxu pacoxu commented Sep 9, 2021

/kind bug
xref kubernetes/kubeadm#2563
/priority important-soon
/hold
util NodeSwap is promoted to beta.

Does this PR introduce a user-facing change?

kubeadm: switch the preflight check (called 'Swap') that verifies if swap is enabled on Linux hosts to report a warning instead of an error. This is related to the graduation of the NodeSwap feature gate in the kubelet to Beta and being enabled by default in 1.23 - allows swap support on Linux hosts. In the next release of kubeadm (1.24) the preflight check will be removed, thus we recommend that you stop using it - e.g. via --ignore-preflight-errors or the kubeadm config.

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

- [KEP]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2400-node-swap
@pacoxu
Copy link
Member Author

@pacoxu pacoxu commented Sep 9, 2021

The check may base on kubeletConfig.featureGates.NodeSwap and kubeletConfig.failSwapOn.

/retest
flake (#104856

Loading

@pacoxu pacoxu marked this pull request as draft Sep 9, 2021
@pacoxu pacoxu marked this pull request as ready for review Sep 9, 2021
Copy link
Member

@neolit123 neolit123 left a comment

kubeadm: switch the preflight check of swap to warning

proposing amend to the release note for more context:

ACTION REQUIRED: kubeadm: switch the preflight check that verifies if swap is enabled on Linux host (called 'Swap') to report a warning instead of an error. This is related to the graduation of the NodeSwap feature gate in the kubelet to Beta and being enabled by default in 1.23 - allowing swap support on Linux hosts. In the next release of kubeadm (1.24) the preflight check will be removed, thus we recommend that you stop using it - e.g. via --ignore-preflight-errors or the kubeadm config.

with that in mind, we should remove the mention about Swap here:

"A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.",

Loading

cmd/kubeadm/app/preflight/checks.go Outdated Show resolved Hide resolved
Loading
@neolit123
Copy link
Member

@neolit123 neolit123 commented Sep 9, 2021

/triage accepted

Loading

@neolit123
Copy link
Member

@neolit123 neolit123 commented Sep 10, 2021

looks like i made a typo in the RN:
(also small amend again)

ACTION REQUIRED: kubeadm: switch the preflight check (called 'Swap') that verifies if swap is enabled on Linux hosts to report a warning instead of an error.
...

Loading

@pacoxu
Copy link
Member Author

@pacoxu pacoxu commented Sep 10, 2021

(called 'Swap') is moved to the right place 😄

Loading

@neolit123
Copy link
Member

@neolit123 neolit123 commented Sep 10, 2021

there was also this part: is enabled on Linux host should be is enabled on Linux hosts.

Loading

pacoxu and others added 2 commits Sep 14, 2021
@pacoxu pacoxu force-pushed the kubeadm-swap-check branch from e7f1699 to d57bad5 Sep 14, 2021
@pacoxu pacoxu marked this pull request as ready for review Sep 14, 2021
@neolit123
Copy link
Member

@neolit123 neolit123 commented Sep 15, 2021

will remove the action required here since our preflight errors code does not error on unknown error strings - e.g. "Swap" might be missing in the future.

/release-note-edit

kubeadm: switch the preflight check (called 'Swap') that verifies if swap is enabled on Linux hosts to report a warning instead of an error. This is related to the graduation of the NodeSwap feature gate in the kubelet to Beta and being enabled by default in 1.23 - allows swap support on Linux hosts. In the next release of kubeadm (1.24) the preflight check will be removed, thus we recommend that you stop using it - e.g. via --ignore-preflight-errors or the kubeadm config.

Loading

@pacoxu
Copy link
Member Author

@pacoxu pacoxu commented Sep 17, 2021

/hold cancel
When I start to work on the swap-promote-beta tasks, I find it is a process with multi-steps to make it beta. We may switch it to warning before it became beta, I think.

Loading

Copy link
Member

@neolit123 neolit123 left a comment

Sgtm,
Hopefully there are no blockers for the beta.

/lgtm
/approve

Loading

@k8s-ci-robot
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Sep 17, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Loading

@k8s-ci-robot k8s-ci-robot merged commit 91f820e into kubernetes:master Sep 17, 2021
14 checks passed
Loading
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants