Skip to content

Commit

Permalink
tests: relax config version check in set_cluster_version
Browse files Browse the repository at this point in the history
The exact == check is only correct if there are no
concurrent modifications to the cluster config.  Now that
we auto-set cluster_id in the background, there are such
background changes, so we use a >= instead.
  • Loading branch information
jcsp committed May 12, 2022
1 parent f79efa3 commit 94a4a9a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/rptest/services/redpanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,11 +930,15 @@ def set_cluster_config(self, values: dict, expect_restart: bool = False):
"""
patch_result = self._admin.patch_cluster_config(upsert=values)
new_version = patch_result['config_version']

# The version check is >= to permit other config writes to happen in
# the background, including the write to cluster_id that happens
# early in the cluster's lifetime
wait_until(
lambda: set([
n['config_version']
lambda: all([
n['config_version'] >= new_version
for n in self._admin.get_cluster_config_status()
]) == {new_version},
]),
timeout_sec=10,
backoff_sec=0.5,
err_msg=f"Config status versions did not converge on {new_version}"
Expand Down

0 comments on commit 94a4a9a

Please sign in to comment.