Skip to content
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

Only Delete LoadBalancerMachine after a grace period #267

Merged
merged 15 commits into from
Dec 5, 2023
Merged

Conversation

maboehm
Copy link
Collaborator

@maboehm maboehm commented Dec 4, 2023

When the apiservers/clusters are unavailable for a longer period of time there can be a race between yawollet and the loadbalancermachine_status_controller, which wants to delete stale machines. A race which the yawollet is likely to lose, since its backoff is very high. (The controller is likely to be running again sooner, because it will be stuck in trying to get/renew its leader lease, which happens more frequently).

This PR fixes this by introducing a grace period, before the LBM is actually deleted. So if the deletion conditions are met (shouldMachineBeDeleted) we now set a condition, and only if that condition has passed the grace period (and the machine is still not ready), we actually delete it.

At the same time, this caps the exponential error backoff of the yawollet to match the reconciliation period in the "happy path".

Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

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

Some early feedback (without looking at the tests).
Looks quite good already, mainly nits

Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

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

Nits

@maboehm maboehm changed the title WIP: Graceful Yawol Machine Deletion Graceful Yawol Machine Deletion Dec 4, 2023
@maboehm maboehm changed the title Graceful Yawol Machine Deletion Only Delete LoadBalancerMachine after a graceful period Dec 4, 2023
@maboehm maboehm changed the title Only Delete LoadBalancerMachine after a graceful period Only Delete LoadBalancerMachine after a grace period Dec 4, 2023
@maboehm maboehm marked this pull request as ready for review December 4, 2023 15:28
Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

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

Code changes look great, let's wait until we have verified the test images :)

timebertt
timebertt previously approved these changes Dec 5, 2023
Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

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

All scenarios were successfully verified in our environment.
Let's get this in :)

Kumm-Kai
Kumm-Kai previously approved these changes Dec 5, 2023
Copy link
Member

@Kumm-Kai Kumm-Kai left a comment

Choose a reason for hiding this comment

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

Thanks ❤️

@timebertt timebertt merged commit f949e16 into main Dec 5, 2023
@timebertt timebertt deleted the grace-period branch December 5, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants