Fix deadlock with OrderedReady StatefulSets - #192
Merged
toelke merged 1 commit intoSep 7, 2026
Merged
Conversation
toelke
requested changes
Sep 5, 2026
toelke
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the contribution! Looks good to me apart from that small thing.
Collaborator
|
And for the failing tests: Please rebase onto main now that I merged #193 |
Collaborator
|
Do you feel comfortable squashing 9caf91f into the other commit and using a rebase instead of a merge? That would make for cleaner history... |
- Add option to disable pod deletion - Move tests for new functionality to e2e tests - Wait for pod in e2e test instead of sleep 5
opaetzelatwork
force-pushed
the
bugfix/statefulset_deadlock
branch
from
September 7, 2026 08:28
9caf91f to
12130a8
Compare
Author
|
Squashed everything into one commit. |
toelke
approved these changes
Sep 7, 2026
Collaborator
|
Thanks for the contribution. I will do a release this week. |
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.
Wave's webhook holds back pods with missing ConfigMaps/Secrets by setting spec.template.spec.schedulerName to wave.pusher.com/invalid.
This leads to a deadlock for OrderedReady Statefulsets, because a Pod's schedulerName is immutable. For a Deployment that's invisible, because the template change spawns a new ReplicaSet and the gated pods are scaled away. A StatefulSet has no equivalent supersession. It mutates pods in place through revisions, and pod-0 is already created from the gated revision.
The StatefulSet controller won't proceed past pod-0 until pod-0 is Running and Ready, so it never reaches the rolling-update phase that would replace the stale-revision pod, and never creates pod-1.
pod-0 can never become Ready, because no scheduler will ever claim a pod whose schedulerName names a scheduler that doesn't exist.
This fix deletes the pods of OrderedReady Statefulsets which have no node assigned and the wave schedulerName still in place after the children have appeared.