Retry setting rbd_stats_pools prometheus config

Setting the 'mgr/prometheus/rbd_stats_pools' option can fail
if we arrive too early, even if the cluster is bootstrapped. This is
particularly seen in ceph-radosgw test runs. This patchset thus
adds a retry decorator to work around this issue.

Change-Id: Id9b7b903e67154e7d2bb6fecbeef7fac126804a8
This commit is contained in:
Luciano Lo Giudice 2024-01-03 18:10:30 -03:00
parent 03868b2c9f
commit d76939ef70
1 changed files with 4 additions and 0 deletions

View File

@ -420,6 +420,10 @@ def _set_require_osd_release(release):
raise OsdPostUpgradeError(call_error)
@tenacity.retry(
wait=tenacity.wait_exponential(multiplier=1, max=10),
reraise=True,
stop=tenacity.stop_after_attempt(30))
def mgr_config_set_rbd_stats_pools():
"""Update ceph mgr config with the value from rbd-status-pools config
"""