Fix StatefulSet recreate failure handling#1997
Open
realyota wants to merge 1 commit into
Open
Conversation
Bug: when restart fallback scaled a host StatefulSet down, a timed-out StatefulSet delete was ignored and the following create failure was converted into ErrCRUDRecreate, which the create path also ignored. The reconcile could therefore report success while the old StatefulSet was still deleting and the replacement pod was not created. Fix: abort recreate when StatefulSet deletion fails, treat create API failures as aborts, and defensively abort if ErrCRUDRecreate reaches the create completion path. Tests: add focused statefulset reconciler unit coverage for create errors, unexpected recreate actions in the create path, and delete failures during recreate.
Contributor
Author
|
Interesting, same problem fixed here: #1993 and it is "treating the cause". Both PRs do not fix all problems. #1997 it is more defensive (catches a wider family of failures, not just 409 on scale-down) but it is missing doDeleteStatefulSet early-return when scale-to-0 (Update) fails and Delete never happens. Probably best way will be to merge #1993 and then rebase on #1997 |
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.
Fix for #1995
Test was written by Codex.
Important items to consider before making a Pull Request
Please check items PR complies to:
next-releasebranch, not intomasterbranch1. More info--
1 If you feel your PR does not affect any Go-code or any testable functionality (for example, PR contains docs only or supplementary materials), PR can be made into
masterbranch, but it has to be confirmed by project's maintainer.