-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 KCP Controller reconcile always return error when workload cluster is unreachable #9342
🐛 Fix KCP Controller reconcile always return error when workload cluster is unreachable #9342
Conversation
…ter is unreachable
Hi @Levi080513. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
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.
/ok-to-test
Thanks @killianmuldoon. Is this PR ready for merge? |
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.
/area provider/control-plane-kubeadm
Thanks for this!
/lgtm
LGTM label has been added. Git tree hash: e17d1d3a60491cfa8f9ea6e34f17d4677dd1569a
|
/lgtm |
@sbueringer It would be great if you had time to review this PR. |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: killianmuldoon 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 |
/lgtm PR is fine, I've opened a PR to optimize this code a bit further: #9448 (review) |
Should we backport this PR and #9448? |
/cherry-pick release-1.5 |
@killianmuldoon: new pull request created: #9449 In response to this:
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. |
/cherry-pick release-1.4 |
@killianmuldoon: new pull request created: #9450 In response to this:
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. |
What this PR does / why we need it:
In this PR #3082, we treat failing to connect to the workload cluster as a transient error and do not add that error to the reconcile reterr.
cluster-api/controlplane/kubeadm/internal/controllers/controller.go
Lines 203 to 211 in 36cbd5b
But this improvement was missed when we migrated to getting the workload ClusterClient from ClusterCacheTracker, and it will causes reconcile always return an error when the workload cluster is unreachable, and the expected reconcile retry interval
RequeueAfter
may does not take effect.So we should re-add this improvement.
Test
Before re-add this improvement, when the first CP Machine fails to initialize, KCP reconcile always return error and the
RequeueAfter
does not take effect.After re-add this improvement, when the first CP Machine fails to initialize, KCP will retry reconcile every 15s.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
/area provider/control-plane-kubeadm