-
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
🐛 Make KCP pre-terminate hook more robust #11161
🐛 Make KCP pre-terminate hook more robust #11161
Conversation
/cherry-pick release-1.8 |
@sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.8 in a new PR and assign it to you. 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-sigs/prow repository. |
/test ? |
@sbueringer: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
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-sigs/prow repository. |
/test pull-cluster-api-e2e-conformance-ci-latest-main |
/assign @chrischdi @fabriziopandini @neolit123 (fyi, we have a patch release coming up this evening, we should get this fix in) |
@@ -595,11 +600,19 @@ func (r *KubeadmControlPlaneReconciler) reconcileDelete(ctx context.Context, con | |||
"Failed to delete control plane Machines for cluster %s control plane: %v", klog.KObj(controlPlane.Cluster), err) | |||
return ctrl.Result{}, err | |||
} | |||
|
|||
log.Info("Waiting for control plane Machines to go away") |
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.
i'd replace 'to go away' with something more formal e.g. 'to be deleted'
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.
But what does "to be deleted" mean? Setting the deeltionTimestamp? It's already on there :)
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.
IMO, 'to be deleted' != 'to have deletionTimestamp applied'.
delete is the HTTP method and kubectl call, etc.
perhaps 'removed' will make it clearer.
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.
I'm not sure. The most precise way to say this is something like "Waiting for control plane Machines to not exist anymore" (+ "in the apiserver"? but maybe the apiserver part would sound a bit strange :))
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.
Done
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.
"Waiting for control plane Machines to not exist anymore"
+1, or anything formal.
/approve |
Signed-off-by: Stefan Büringer [email protected]
db292e7
to
4c83455
Compare
/test pull-cluster-api-e2e-conformance-ci-latest-main |
Thanks for the quick fix! pending tests |
LGTM label has been added. Git tree hash: 8cfd0ad0f5bd121695da96d4069ce0e54c5d10f5
|
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: chrischdi, fabriziopandini, neolit123 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 |
/test pull-cluster-api-e2e-latestk8s-main (all 3 were about to fail) |
Please dont' retest. I'll assess flakes individually and consider overrides |
double checked
(so it seems a well know flake) |
Unbelievable - all green |
@sbueringer: new pull request created: #11165 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-sigs/prow repository. |
/cherry-pick release-1.7 For evaluation, seeing similar issue in 1.7.2 version |
@Danil-Grigorev: #11161 failed to apply on top of branch "release-1.7":
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-sigs/prow repository. |
@Danil-Grigorev If you are seeing a similar effect, it should not be the same root cause. The change that triggered this issue and that we are fixing here was never backported to release-1.7 |
This is the chain of PRs and fixes that got us here. We needed it for 1.31 support, so it was never backported to 1.7: |
Signed-off-by: Stefan Büringer [email protected]
What this PR does / why we need it:
Follow-up to #11137
Additional context: https://kubernetes.slack.com/archives/C8TSNPY4T/p1725952675583209
This PR ensures that KCP always removes the pre-terminate hook from Machines if KCP is deleted.
Before this PR this was only done if a Machine didn't have a deletionTimestamp.
There are edge cases where a Machine could have a deletionTimestamp before (or at the same time) as KCP:
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 #