Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COS integration: prometheus tenacity #1264

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading