Resolve concurrency problem causing skipping taint by surfacing error and retrying with SQS#1279
Merged
Merged
Conversation
… and retry with SQS Co-authored-by: mcornea mcornea@redhat.com
Contributor
|
Since you were able to reproduce the original bug, can you also test that this PR fixes the bug? Unit tests and e2e tests won't be enough |
Lu-David
approved these changes
Jun 8, 2026
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.
Issue #, if available:
#1277
Description of changes:
As mentioned in the issue above, concurrency problems leads to taint errors. In specific, for situations over 100+ nodes getting de-provisioned simultaneously, 3-6% of nodes fails to be tainted and proceeds to be cordoned. This was due to the taint error not surfacing, and the message disappearing from the queue even without a successful taint. The new change explicitly returns the taint error and fails the pre-drain task so that the failed message can be handled by SQS retry logic.
Also added
DeleteSqsMsgIfNodeNotFoundcondition (passed in as config param) in case the user wants to delete the message if the node is gone, to maintain consistent behavior with postDrain path.How you tested your changes:
Environment (Linux / Windows):
Locally with unit-tests, e2e run by github workflow.
Verified the fix of #1277 by actually launching +100 instances and interrupting them simultaneously (tested both reproduction of the bug and the fix of the bug).
Kubernetes Version:
1.32
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.