partition_balancer_test: deflake rack awareness#29704
Merged
joe-redpanda merged 1 commit intoredpanda-data:devfrom Mar 5, 2026
Merged
partition_balancer_test: deflake rack awareness#29704joe-redpanda merged 1 commit intoredpanda-data:devfrom
joe-redpanda merged 1 commit intoredpanda-data:devfrom
Conversation
test rack awareness runs rpk commands with a cluster that has stopped nodes. RPK picks its own endpoint for commands, and therefore can pick the stopped node. though the test specifies retry for 120s with 1s backoff, the rpk command will execute against the stopped node for 30s before failing. Changes the timeout to be 5 instead of 30s, s.t. rpk will have a substantial number of retries in which it can pick a non-dead node. This should take us from (1/6)^4 aka ~.1% failure rate to (1/6)^24 (vanishingly small) on this particular issue.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a test flakiness issue in the test_rack_awareness test by reducing the timeout for RPK commands from 30 seconds to 5 seconds when interacting with clusters that have stopped nodes.
Changes:
- Adds a
timeout=5parameter to therpk.describe_topic()call in thetopic_partitions_replicasmethod to reduce the default 30s timeout
Contributor
Author
|
I could also fix this by just hitting the admin api with an admin client configured against the surviving, not stopped nodes. |
bashtanov
approved these changes
Mar 5, 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.
test_rack_awareness runs rpk commands with a cluster that has stopped nodes.
RPK picks its own endpoint for commands, and therefore can pick the stopped node.
Though the test specifies retry for 120s with 1s backoff, the rpk command will execute against the stopped node for 30s before failing. Given this, the test retries 4 times worst case scenario. This means the test may pick the stopped node 4 times in a row approximately (1/6)^4 of test runs.
This pr changes the timeout to be 5 instead of 30s, s.t. RPK will have a substantial number of retries in which it can pick a non-dead node.
This should take us from (1/6)^4 aka ~.1% failure rate to (1/6)^24 (order of 1e-17 %) on this particular issue, at which point we are more likely for the test to fail for unrelated and genuinely anomalous reasons.
Backports Required
Release Notes