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

Add waiting for endpoints between units scaling #1142

Merged
merged 1 commit into from
Oct 3, 2023
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
14 changes: 10 additions & 4 deletions zaza/openstack/charm_tests/tempest/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import logging
import os
import subprocess
import tenacity

import zaza
import zaza.charm_lifecycle.utils
import zaza.charm_lifecycle.test
import zaza.openstack.charm_tests.tempest.utils as tempest_utils
import zaza.charm_lifecycle.utils as lifecycle_utils
import tempfile
import tenacity


class TempestTestBase():
Expand Down Expand Up @@ -183,7 +183,11 @@ def run(self):
:returns: Status of tempest run
:rtype: bool
"""
tempest_utils.render_tempest_config_keystone_v3(minimal=True)
render_tempest_config_keystone_v3 = tenacity.retry(
wait=tenacity.wait_fixed(10), stop=tenacity.stop_after_attempt(3)
)(tempest_utils.render_tempest_config_keystone_v3)
zaza.openstack.charm_tests.keystone.setup.wait_for_all_endpoints()
render_tempest_config_keystone_v3(minimal=True)
if not super().run():
return False

Expand All @@ -193,7 +197,8 @@ def run(self):
zaza.model.block_until_all_units_idle()
logging.info("Wait for status ready ...")
zaza.model.wait_for_application_states(states=self.expected_statuses)
tempest_utils.render_tempest_config_keystone_v3(minimal=True)
zaza.openstack.charm_tests.keystone.setup.wait_for_all_endpoints()
render_tempest_config_keystone_v3(minimal=True)
if not super().run():
return False

Expand All @@ -206,7 +211,8 @@ def run(self):
zaza.model.block_until_all_units_idle()
logging.info("Wait for status ready ...")
zaza.model.wait_for_application_states(states=self.expected_statuses)
tempest_utils.render_tempest_config_keystone_v3(minimal=True)
zaza.openstack.charm_tests.keystone.setup.wait_for_all_endpoints()
render_tempest_config_keystone_v3(minimal=True)
return super().run()


Expand Down
Loading