-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Stricter kubeadm validation (config and runtime checks) #11710
Stricter kubeadm validation (config and runtime checks) #11710
Conversation
/ok-to-test |
1535f68
to
30a4be2
Compare
30a4be2
to
1d2a84f
Compare
The "ignoring all errors" seems to date back to the inception of the kubeadm support (it was --skip-preflight-check before). This can mask real errors and prevent users from seeing them. Do not ignore any errors by default and make the set of ignored errors configurable.
The mode is already set by the previous `copy` task.
This should help to fail early when we have invalid kubeadm configs (from a kubespray bug or a misconfiguration).
1d2a84f
to
53501cc
Compare
Well, the validation works:
|
I had missed one.
|
8fb943c
to
bf7ede7
Compare
/cc @tico88612 |
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.
The default value of the variable --ignore-preflight-errors
is all
, which is weird. (face plam laugh)
It's a good change, thank you!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MrFreezeex, tico88612, VannTen 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 |
…igs#11710) * kubeadm: do not ignore preflight errors blindly The "ignoring all errors" seems to date back to the inception of the kubeadm support (it was --skip-preflight-check before). This can mask real errors and prevent users from seeing them. Do not ignore any errors by default and make the set of ignored errors configurable. * download/kubeadm: remove redundant task The mode is already set by the previous `copy` task. * Validate kubeadm configs This should help to fail early when we have invalid kubeadm configs (from a kubespray bug or a misconfiguration). * kubeadm-upgrade: remove unnecessary bool cast * Convert kubeadm join discovery timeout to v1beta4 config * CI: Ignore kubeadm:Mem errors on some setup.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This makes kubespray stricter regarding kubeadm config and errors in 2 ways:
We need this in order to catch bad formatting of the config files (which are otherwise non-fatal), which could led to settings not applied at all.
Also some cleanups, and fix some stuff introducted in v1beta4 support #11674 (not caught because of the lack of that validation, precisely)
Special notes for your reviewer:
Apparently, we ignore kubeadm errors since the introduction of kubeadm support in #1631 (commit 6da20e2
Does this PR introduce a user-facing change?: