-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Fix race condition when joining nodes #72151
Fix race condition when joining nodes #72151
Conversation
Despite we were checking for the kubelet kubeconfig file to be present, the kubelet first writes this file and then the certificates the kubeconfig file refers to. This represents a race condition in kubeadm in which when we confirm that the kubelet's kubeconfig file is present we continue creating a clientset out of it. However, the clientset creation will ensure that the certificates the kubeconfig file refers to exist on the filesystem. To fix this problem, not only wait for the kubelet's kubeconfig file to be present, but also ensure that we can create a clientset ouf of it on our polling process, while we wait for the kubelet to have performed the TLS bootstrap. (cherry picked from commit a31c160463d8ed76b6a627e8ed879d72f79d9e08)
@ereslibre: This PR is not for the master branch but does not have the To approve the cherry-pick, please assign the patch release manager for the release branch by writing The list of patch release managers for each release can be found here. 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. |
Hi @ereslibre. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ereslibre If they are not already assigned, you can assign the PR to them by writing 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 |
Closing due to not being the standard way of performing a cherry pick; just learnt about https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Despite we were checking for the kubelet kubeconfig file to be present, the
kubelet first writes this file and then the certificates the kubeconfig file
refers to. This represents a race condition in kubeadm in which when we confirm
that the kubelet's kubeconfig file is present we continue creating a clientset
out of it. However, the clientset creation will ensure that the certificates the
kubeconfig file refers to exist on the filesystem.
To fix this problem, not only wait for the kubelet's kubeconfig file to be
present, but also ensure that we can create a clientset ouf of it on our polling
process, while we wait for the kubelet to have performed the TLS bootstrap.
(cherry picked from commit a31c160463d8ed76b6a627e8ed879d72f79d9e08)
Backport of #72030
Which issue(s) this PR fixes:
Fixes kubernetes/kubeadm#1319
Does this PR introduce a user-facing change?: