Skip to content

Commit

Permalink
ducky: adjust partition_balancer's maintenance test
Browse files Browse the repository at this point in the history
  • Loading branch information
rystsov committed Sep 29, 2023
1 parent f46f087 commit 9f32bb9
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions tests/rptest/tests/partition_balancer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,14 +747,12 @@ def is_ready_and_stable(s):
@matrix(kill_same_node=[True, False])
def test_maintenance_mode(self, kill_same_node):
"""
Test interaction with maintenance mode: the balancer should not schedule
any movements as long as there is a node in maintenance mode.
Test interaction with maintenance mode: the mode should not interfere
with partition balancer.
Test scenario is as follows:
* enable maintenance mode on some node
* kill a node (the same or some other)
* check that we don't move any partitions and node switched to maintenance
mode smoothly
* turn maintenance mode off, check that partition balancing resumes
* check that balancing works
"""
self.start_redpanda(num_nodes=5)

Expand Down Expand Up @@ -798,7 +796,6 @@ def entered_maintenance_mode(node):
])

ns.make_unavailable(to_kill)
self.wait_until_status(lambda s: s["status"] == "stalled")

if kill_same_node:
ns.make_available()
Expand All @@ -807,11 +804,6 @@ def entered_maintenance_mode(node):
timeout_sec=120,
backoff_sec=10)

# return back to normal.
# rpk will make 3 admin requests with 10 second timeout, so with 1 problematic node,
# worst case it will hang for 30 seconds, which also happens to be the default RpkTool
# timeout. Therefore we need a larger timeout than that.
rpk.cluster_maintenance_disable(node, timeout=35)
# use raw admin interface to avoid waiting for the killed node
admin.patch_cluster_config(
{"raft_learner_recovery_rate": 100_000_000})
Expand Down

0 comments on commit 9f32bb9

Please sign in to comment.