From 4b3245db5772507604a4066d2e1b655b7bdc40e6 Mon Sep 17 00:00:00 2001 From: Alexey Zatelepin Date: Tue, 16 Jul 2024 21:59:01 +0200 Subject: [PATCH] tests/maintenance_test: increase _has_leadership_role timeout Previously we waited for 50 seconds in total to ensure that the node has some leaders. If it hadn't acquired any leaders "naturally", this was not enough because the leadership balancer needs at least 1 minute to unmute just restarted nodes and perform another tick. (cherry picked from commit 2c6aaf73da1e2a094bcd0bd8995d2709df82b32c) --- tests/rptest/tests/maintenance_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/rptest/tests/maintenance_test.py b/tests/rptest/tests/maintenance_test.py index 4d115320499a8..9993c8a2540ae 100644 --- a/tests/rptest/tests/maintenance_test.py +++ b/tests/rptest/tests/maintenance_test.py @@ -131,8 +131,12 @@ def _enable_maintenance(self, node): """ self.logger.debug( f"Checking that node {node.name} has a leadership role") + # In case the node is unlucky and doesn't get any leaders "naturally", + # we have to wait for the leadership balancer to do its job. We have to wait + # at least 1 minute for it to unmute just restarted nodes and perform another + # tick. Wait more than leader_balancer_idle_timeout (2 minutes) just to be sure. wait_until(lambda: self._has_leadership_role(node), - timeout_sec=60, + timeout_sec=150, backoff_sec=10) self.logger.debug(