-
Notifications
You must be signed in to change notification settings - Fork 40.6k
kubeadm: Add retries for kubeadm join / UpdateStatus #91952
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: Add retries for kubeadm join / UpdateStatus #91952
Conversation
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
/test pull-kubernetes-integration |
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 @xlgao-zju !
/approve
return errors.Wrap(err, "unable to create RBAC role") | ||
} | ||
return wait.PollImmediate(constants.APICallRetryInterval, constants.APICallWithWriteTimeout, func() (bool, error) { | ||
if _, err := client.RbacV1().Roles(role.ObjectMeta.Namespace).Create(context.TODO(), role, metav1.CreateOptions{}); err != 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.
Note to myself: context.TODO()
nested in a PollImmediate()
is not a viable long term thing.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rosti, xlgao-zju 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 |
/retest |
i confused why we closed #91815 ideally these calls should retry for ~40 seconds (e.g. APICallWithWriteTimeout) and one option is to bump them to 80 steps, but this is a bit silly. in my opining it is better to refactor them to use:
|
@neolit123 I have refacted CreateOrMutateConfigMap and MutateConfigMap with PollImmediate. PTAL |
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
d5000b7
to
04ef362
Compare
/lgtm |
What type of PR is this?
/kind bug
What this PR does / why we need it:
To make update status more resilient by adding a retry loop to this operation
Which issue(s) this PR fixes:
Fixes kubernetes/kubeadm#2092
Special notes for your reviewer:
/assign @neolit123
/assign @fabriziopandini
/assign @rosti
Does this PR introduce a user-facing change?: NONE