Skip to content

Commit

Permalink
test: wait for cluster config status on controller leader
Browse files Browse the repository at this point in the history
If we query another node, it is possible to see persistent
status updates for the nodes _other_ than the one we are
querying, and non-persistent update to the stauts of the node
we are querying, that passes the version check.

Then if we query status on a different node a moment later,
we will see an older state for the node we first queried.

This only matters for tests that are actively trying to read the
status _again_ after wait_for_version_sync.  wait_for_version_sync
was already correct inasmuchas when it complete the config has
been applied everywhere.
  • Loading branch information
jcsp committed Aug 8, 2022
1 parent c35eb1d commit 13d211a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/rptest/services/redpanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,8 @@ def set_cluster_config(self, values: dict, expect_restart: bool = False):
# early in the cluster's lifetime
wait_until(
lambda: all([
n['config_version'] >= new_version
for n in self._admin.get_cluster_config_status()
n['config_version'] >= new_version for n in self._admin.
get_cluster_config_status(node=self.controller())
]),
timeout_sec=10,
backoff_sec=0.5,
Expand Down
4 changes: 2 additions & 2 deletions tests/rptest/tests/cluster_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ def test_bootstrap(self):
def _wait_for_version_sync(self, version):
wait_until(
lambda: set([
n['config_version']
for n in self.admin.get_cluster_config_status()
n['config_version'] for n in self.admin.
get_cluster_config_status(node=self.redpanda.controller())
]) == {version},
timeout_sec=10,
backoff_sec=0.5,
Expand Down

0 comments on commit 13d211a

Please sign in to comment.