Retry ceph-proxy pool test
When running the pool setup we test after the model is idle, but that is not a guarantee that all pools have finished setup, so that the test could race the pool creation. Add retry to the test to give the system another chance to complete pool creation
This commit is contained in:
@@ -1225,10 +1225,16 @@ class CephProxyTest(unittest.TestCase):
|
||||
zaza_model.wait_for_application_states(
|
||||
states=self.target_deploy_status)
|
||||
|
||||
pools = zaza_ceph.get_ceph_pools('ceph-mon/0')
|
||||
if 'cinder-ceph' not in pools:
|
||||
msg = 'cinder-ceph pool was not found upon querying ceph-mon/0'
|
||||
raise zaza_exceptions.CephPoolNotFound(msg)
|
||||
for attempt in tenacity.Retrying(
|
||||
wait=tenacity.wait_exponential(multiplier=2, max=32),
|
||||
reraise=True, stop=tenacity.stop_after_attempt(8),
|
||||
):
|
||||
with attempt:
|
||||
pools = zaza_ceph.get_ceph_pools('ceph-mon/0')
|
||||
if 'cinder-ceph' not in pools:
|
||||
msg = ('cinder-ceph pool not found querying ceph-mon/0,'
|
||||
'got: {}'.format(pools))
|
||||
raise zaza_exceptions.CephPoolNotFound(msg)
|
||||
|
||||
# Checking for cinder-ceph specific permissions makes
|
||||
# the test more rugged when we add additional relations
|
||||
|
||||
Reference in New Issue
Block a user