Repository navigation
fix(inkless:test): query topic state from a controller host in switch tests - #917
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Inkless topic-switch query-host changes.
No open issues 🎉
What changed in this PR
This PR makes Inkless topic-switch tests more reliable during broker network partitions by running topic-state queries from a controller host that can reach all brokers.
Changes:
- Adds a shared query-host selector that prefers an isolated controller host and otherwise uses the first running broker.
- Applies the selector to leader, broker-ISR, and full-ISR waits while retaining broker bootstrap connections.
| File | Description |
|---|---|
tests/kafkatest/tests/inkless/inkless_topic_switch_test.py |
Centralizes query-host selection and updates all three topic-state waits. |
Review effort: Balanced
gqmelo
approved these changes
Dec 2, 2026
gqmelo
enabled auto-merge (squash)
December 2, 2026 13:49
… tests The switch test helpers ran `kafka-topics --describe` on the first running broker. When that broker is the one a network partition cuts off, the leader check can't get an answer: `--describe` also sends `ListPartitionReassignments` to a random unfenced broker, and the cut-off broker is still unfenced. If the pick is a broker the query node can't reach, the command waits out the 60 s client timeout. Two such attempts used up the 120 s budget of `_wait_for_all_partitions_have_leaders` in the nightly run of `test_fault_before_control_plane_init` with `fault=leader_sigkill`, although every partition had a leader 7 s after the kill. Querying from another broker doesn't help, because it can draw the cut-off broker. The leader, ISR, and full-ISR waits now run `kafka-topics` from a host of the isolated controller quorum. The network partitions in these tests list only brokers, so that host reaches every broker. Without an isolated quorum, the helpers fall back to the first running broker. Assisted-by: Claude Opus 5.5
giuseppelillo
force-pushed
the
glillo/inkless-system-test-failures-442f91
branch
from
December 2, 2026 14:33
0fda3b5 to
56aa176
Compare
This was referenced Dec 3, 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.
The switch test helpers ran
kafka-topics --describeon the first running broker. When that broker is the one a network partition cuts off, the leader check can't get an answer.--describealso sendsListPartitionReassignmentsto a random unfenced broker, and the cut-off broker is still unfenced. If the pick is a broker the query node can't reach, the command waits out the 60 s client timeout.In the nightly run of
test_fault_before_control_plane_initwithhold=replicationandfault=leader_sigkill(run), two such attempts used up the 120 s budget of_wait_for_all_partitions_have_leaders. Every partition had a leader 7 s after the kill: theDescribeTopicPartitionsresponses on the query broker list a leader for all 6 partitions. Both attempts gotcontrollerId2 in their Metadata responses, a broker the query broker couldn't reach, and no broker logged aListPartitionReassignmentsrequest. Querying from another broker doesn't help, because that broker can draw the cut-off broker.The leader, ISR, and full-ISR waits now run
kafka-topicsfrom a host of the isolated controller quorum. The network partitions in these tests list only brokers, so that host reaches every broker. The command still bootstraps against the brokers. Without an isolated quorum, the helpers fall back to the first running broker.Test plan
python3 -m py_compileon the test file.make valereports no alerts.🤖 Generated with Claude Code