Skip to content

Commit

Permalink
COS integration: prometheus tenacity
Browse files Browse the repository at this point in the history
Be more insistent in querying metrics

Signed-off-by: Peter Sabaini <[email protected]>
  • Loading branch information
sabaini committed Sep 10, 2024
1 parent fc2994e commit 03ce7d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions zaza/openstack/charm_tests/ceph/mon/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ def application_present(name):
return False


# retry a few times until osd count is larger than 0
@tenacity.retry(
wait=tenacity.wait_fixed(5),
retry=tenacity.retry_if_result(lambda result: result <= 0),
stop=tenacity.stop_after_delay(180),
)
def get_up_osd_count(prometheus_url):
"""Get the number of up OSDs from prometheus."""
query = "ceph_osd_up"
Expand Down

0 comments on commit 03ce7d5

Please sign in to comment.