Skip to content

Commit

Permalink
Add ObjectRetrierWraps for cinder/nova clients in cinder tests
Browse files Browse the repository at this point in the history
Due to how apache2 & haproxy interact on the cinder unit, this adds the
ObjectRetrier to the cinder and nova clients to allow for the time delay
between the apache2 service starting and the haproxy service noticing
and opening the port.  This allows the test_100... cinder test to
function as (technically) there isn't an error.
  • Loading branch information
ajkavanagh committed Nov 9, 2023
1 parent 04af9b3 commit 88d0b4c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions zaza/openstack/charm_tests/cinder/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import zaza.openstack.configure.guest as guest
import zaza.openstack.charm_tests.nova.utils as nova_utils
import zaza.openstack.charm_tests.tempest.tests as tempest_tests
from zaza.openstack.utilities import ObjectRetrierWraps

from tenacity import (
Retrying,
Expand All @@ -48,10 +49,14 @@ def setUpClass(cls):
cls.lead_unit = zaza.model.get_lead_unit_name(
"cinder", model_name=cls.model_name)
# version 3.42 is required for in-use (online) resizing lvm volumes
cls.cinder_client = openstack_utils.get_cinder_session_client(
cls.keystone_session, version=3.42)
cls.nova_client = openstack_utils.get_nova_session_client(
cls.keystone_session)
# Add retries to cinder and nova to allow for async restart issues and
# services becoming ready between configuration and individual tests.
cls.cinder_client = ObjectRetrierWraps(
openstack_utils.get_cinder_session_client(
cls.keystone_session, version=3.42))
cls.nova_client = ObjectRetrierWraps(
openstack_utils.get_nova_session_client(
cls.keystone_session))

@classmethod
def tearDown(cls):
Expand Down

0 comments on commit 88d0b4c

Please sign in to comment.