Merge branch 'master' into glance-s3
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
"""Code for configuring glance-simplestreams-sync."""
|
||||
|
||||
import logging
|
||||
import tenacity
|
||||
|
||||
import zaza.model as zaza_model
|
||||
import zaza.openstack.utilities.generic as generic_utils
|
||||
@@ -30,11 +31,17 @@ def sync_images():
|
||||
deployment.
|
||||
"""
|
||||
logging.info("Synchronising images using glance-simplestreams-sync")
|
||||
generic_utils.assertActionRanOK(
|
||||
zaza_model.run_action_on_leader(
|
||||
"glance-simplestreams-sync",
|
||||
"sync-images",
|
||||
raise_on_failure=True,
|
||||
action_params={},
|
||||
)
|
||||
)
|
||||
for attempt in tenacity.Retrying(
|
||||
stop=tenacity.stop_after_attempt(3),
|
||||
wait=tenacity.wait_exponential(
|
||||
multiplier=1, min=2, max=10),
|
||||
reraise=True):
|
||||
with attempt:
|
||||
generic_utils.assertActionRanOK(
|
||||
zaza_model.run_action_on_leader(
|
||||
"glance-simplestreams-sync",
|
||||
"sync-images",
|
||||
raise_on_failure=True,
|
||||
action_params={},
|
||||
)
|
||||
)
|
||||
|
||||
@@ -401,9 +401,10 @@ class BasePolicydSpecialization(PolicydTest,
|
||||
def test_003_test_override_is_observed(self):
|
||||
"""Test that the override is observed by the underlying service."""
|
||||
if (openstack_utils.get_os_release() <
|
||||
openstack_utils.get_os_release('groovy_victoria')):
|
||||
openstack_utils.get_os_release('xenial_queens')):
|
||||
raise unittest.SkipTest(
|
||||
"Test skipped until Bug #1880959 is fix released")
|
||||
"Test skipped because bug #1880959 won't be fixed for "
|
||||
"releases older than Queens")
|
||||
if self._test_name is None:
|
||||
logging.info("Doing policyd override for {}"
|
||||
.format(self._service_name))
|
||||
@@ -571,6 +572,13 @@ class GlanceTests(BasePolicydSpecialization):
|
||||
super(GlanceTests, cls).setUpClass(application_name="glance")
|
||||
cls.application_name = "glance"
|
||||
|
||||
# NOTE(lourot): Same as NeutronApiTests. There is a race between the glance
|
||||
# charm signalling its readiness and the service actually being ready to
|
||||
# serve requests. The test will fail intermittently unless we gracefully
|
||||
# accept this.
|
||||
# Issue: openstack-charmers/zaza-openstack-tests#578
|
||||
@tenacity.retry(wait=tenacity.wait_fixed(1),
|
||||
reraise=True, stop=tenacity.stop_after_delay(8))
|
||||
def get_client_and_attempt_operation(self, ip):
|
||||
"""Attempt to list the images as a policyd override.
|
||||
|
||||
|
||||
@@ -440,7 +440,7 @@ class TrilioGhostNFSShareTest(TrilioBaseTest):
|
||||
)
|
||||
|
||||
|
||||
class TrilioWLMTest(TrilioGhostNFSShareTest):
|
||||
class TrilioWLMBaseTest(TrilioBaseTest):
|
||||
"""Tests for Trilio Workload Manager charm."""
|
||||
|
||||
conf_file = "/etc/workloadmgr/workloadmgr.conf"
|
||||
@@ -478,3 +478,11 @@ class TrilioDataMoverNFSTest(TrilioDataMoverBaseTest, TrilioGhostNFSShareTest):
|
||||
|
||||
class TrilioDataMoverS3Test(TrilioDataMoverBaseTest):
|
||||
"""Tests for Trilio Data Mover charm backed by S3."""
|
||||
|
||||
|
||||
class TrilioWLMNFSTest(TrilioWLMBaseTest, TrilioGhostNFSShareTest):
|
||||
"""Tests for Trilio WLM charm backed by NFS."""
|
||||
|
||||
|
||||
class TrilioWLMS3Test(TrilioWLMBaseTest):
|
||||
"""Tests for Trilio WLM charm backed by S3."""
|
||||
|
||||
Reference in New Issue
Block a user