Repository navigation
feat: Yield leadership of keeper pods before graceful shutdown - #351
Merged
Merged
Conversation
Add a default overridable Prestop lifecycle hook for keeper pods. The hook executes four letter word `yldl` then keeps polling until the pod is not a leader.
mu-soliman
force-pushed
the
yield-leadership
branch
from
September 28, 2026 12:02
4dc1177 to
573b160
Compare
mu-soliman
marked this pull request as ready for review
September 29, 2026 14:43
This was referenced Sep 29, 2026
GrigoryPervakov
approved these changes
Sep 29, 2026
GrigoryPervakov
approved these changes
Sep 30, 2026
|
Docs PR opened: ClickHouse/ClickHouse#123072 Added a Keeper preStop leadership handover section to the configuration guide and a lifecycle field to the API reference. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When the current keeper leader is restarted, a new leader is elected only after the old leader stops and timeout period passes. This creates a short period without a leader.
What
Add a default PreStop Lifecycle hook for keeper pods. The hook executes four letter word command
ydldthen keeps polling until the pod is not a leader.The PreStop Lifecycle hook is overridable by defining it in the container template spec. This allows users to do something like setting an empty hook, which could be helpful for users who run distroless images that has no bash so they cannot run the default PreStop hook.
Related Issues
Fixes #346