Skip to content

✨ MachinePools: Use NodeDeletionTimeout and default it to 10s #10553

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

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

serngawy
Copy link
Contributor

@serngawy serngawy commented May 3, 2024

What this PR does / why we need it:
Ignore unreachable cluster while deleting machinePools

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 #10544

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels May 3, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @serngawy!

It looks like this is your first PR to kubernetes-sigs/cluster-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @serngawy. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 3, 2024
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ok-to-test
/area machinepools

@k8s-ci-robot
Copy link
Contributor

@killianmuldoon: The label(s) area/machinepools cannot be applied, because the repository doesn't have them.

In response to this:

/ok-to-test
/area machinepools

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.

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 8, 2024
@killianmuldoon killianmuldoon added the area/machinepool Issues or PRs related to machinepools label May 8, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-area PR is missing an area label label May 8, 2024
@chrischdi
Copy link
Member

I think this one goes into a different direction then described in:

and

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 8, 2024
@serngawy
Copy link
Contributor Author

/cc @mboersma

@k8s-ci-robot k8s-ci-robot requested a review from mboersma May 14, 2024 20:31
@serngawy
Copy link
Contributor Author

@mboersma would review the PR and let me know your thoughts.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 21, 2024
@serngawy serngawy force-pushed the issue-10544 branch 2 times, most recently from 022d53e to 6da8906 Compare May 21, 2024 19:39
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 4, 2024
@k8s-ci-robot k8s-ci-robot requested a review from sbueringer July 4, 2024 03:33
@sbueringer sbueringer added this to the v1.8 milestone Jul 10, 2024
@sbueringer
Copy link
Member

I think we're almost there :)

@sbueringer
Copy link
Member

sbueringer commented Jul 15, 2024

@serngawy If you got time, if we get the findings addressed pretty soon, we'll get this merged in time for v1.8 :) (just a heads up)

(Feel free to ping me in Slack for another review)

@serngawy
Copy link
Contributor Author

@serngawy If you got time, if we get the findings addressed pretty soon, we'll get this merged in time for v1.8 :) (just a heads up)

(Feel free to ping me in Slack for another review)

Thanks @sbueringer for the follow up. Unfortunately in PTO this week, will work on it next week.

@sbueringer
Copy link
Member

@serngawy If you got time, if we get the findings addressed pretty soon, we'll get this merged in time for v1.8 :) (just a heads up)
(Feel free to ping me in Slack for another review)

Thanks @sbueringer for the follow up. Unfortunately in PTO this week, will work on it next week.

Enjoy your time off!

@serngawy serngawy force-pushed the issue-10544 branch 3 times, most recently from 3ad8d1b to 90431ac Compare July 22, 2024 21:30
@sbueringer
Copy link
Member

sbueringer commented Jul 23, 2024

Please rebase this PR on top of main instead of merging main into this PR.

I don't remember the exact reason, but I think we run into problems when we merge PRs that have merge commits from main

@sbueringer
Copy link
Member

sbueringer commented Jul 23, 2024

Let's rebase onto main, address #10553 (comment) and then merge this PR

I'll probably do another iteration on the unit tests as a follow-up PR. I would prefer testing slightly more realistic scenarios

@sbueringer
Copy link
Member

Thank you!

/lgtm
/test pull-cluster-api-e2e-main

/assign @chrischdi

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 23, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1743c72d9a5ea8b6c72eb26bfb742cb09deecddf

@sbueringer
Copy link
Member

/retest

Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change the title to something which better describes this change?

I think this currently not only makes "MachinePools to honour the NodeDeletionTimeout".

Am I right that this also helps deleting a MachinePool when Bootstrap.ConfigRef or InfrastructureRef is not set?

If yes the title should highlight both because it will be part of release notes (ok to have as follow-up).

Comment on lines +116 to +118
if m.Spec.Template.Spec.NodeDeletionTimeout == nil {
m.Spec.Template.Spec.NodeDeletionTimeout = &metav1.Duration{Duration: defaultNodeDeletionTimeout}
}
Copy link
Member

@chrischdi chrischdi Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding defaulting to 10 seconds and skipping the node deletion IMHO is a change in the behaviour of the controller.

Should we mark this as feature (❇️ ) in the title?

Note: this should not get cherry-picked to older release branches, but maybe folks more involved in MachinePools can argue better.

@chrischdi
Copy link
Member

/retitle ✨ MachinePools: Use NodeDeletionTimeout and default it to 10s

/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 24, 2024
@k8s-ci-robot k8s-ci-robot changed the title 🐛 Let machinePools to honour NodeDeletionTimeout ✨ MachinePools: Use NodeDeletionTimeout and default it to 10s Jul 24, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 24, 2024
@k8s-ci-robot k8s-ci-robot merged commit 42f7b89 into kubernetes-sigs:main Jul 24, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/machinepool Issues or PRs related to machinepools cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to delete machinePool for unreachable cluster
7 participants