Configure Tobiko to skip swift containers health checks when Ceph RGW is deployed.
Change-Id: Ic1a2c11ef57600902fd535c38a26343166617e52
This commit is contained in:
committed by
Eduardo Olivares
parent
19edd613de
commit
50c9225d92
@@ -245,6 +245,11 @@ subparsers:
|
||||
--quota routers=30
|
||||
--quota secgroups=50
|
||||
Check "openstack quota set --help" for more information
|
||||
ceph-rgw:
|
||||
type: Bool
|
||||
help: Skip Swift containers healthchecks when CephAdm is deployed
|
||||
ansible_variable: ceph_rgw
|
||||
default: False
|
||||
|
||||
- title: Cleanup stage
|
||||
options:
|
||||
|
||||
@@ -15,6 +15,7 @@ test_default_conf:
|
||||
overcloud_ssh_username: "{{ overcloud_ssh_username }}"
|
||||
undercloud_ssh_key_filename: "{{ undercloud_ssh_key_filename }}"
|
||||
has_external_load_balancer: "{{ has_external_load_balancer }}"
|
||||
ceph_rgw: "{{ ceph_rgw }}"
|
||||
|
||||
test_log_debug: ''
|
||||
|
||||
@@ -30,3 +31,5 @@ undercloud_ssh_key_filename: ''
|
||||
has_external_load_balancer: ''
|
||||
|
||||
overcloud_ssh_username: ''
|
||||
|
||||
ceph_rgw: ''
|
||||
|
||||
@@ -51,60 +51,75 @@ class ContainersHealthTest(testtools.TestCase):
|
||||
"""check that all common tripleo containers are running"""
|
||||
containers.assert_containers_running('controller', ['cinder_api'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_rsync(self):
|
||||
containers.assert_containers_running('controller', ['swift_rsync'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_proxy(self):
|
||||
containers.assert_containers_running('controller', ['swift_proxy'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_object_updater(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_object_updater'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_object_server(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_object_server'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_object_replicator(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_object_replicator'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_object_expirer(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_object_expirer'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_object_auditor(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_object_auditor'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_container_updater(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_container_updater'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_container_server(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_container_server'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_container_replicator(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_container_replicator'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_container_auditor(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_container_auditor'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_account_server(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_account_server'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_account_replicator(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_account_replicator'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_account_reaper(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_account_reaper'])
|
||||
|
||||
@tripleo.skip_if_ceph_rgw()
|
||||
def test_swift_account_auditor(self):
|
||||
containers.assert_containers_running('controller',
|
||||
['swift_account_auditor'])
|
||||
|
||||
@@ -18,6 +18,7 @@ from tobiko.tripleo import _overcloud as overcloud
|
||||
from tobiko.tripleo import _rhosp
|
||||
from tobiko.tripleo import _topology as topology
|
||||
from tobiko.tripleo import _undercloud as undercloud
|
||||
from tobiko.tripleo import containers
|
||||
|
||||
|
||||
get_tripleo_ansible_inventory = _ansible.get_tripleo_ansible_inventory
|
||||
@@ -50,6 +51,7 @@ overcloud_ssh_client = overcloud.overcloud_ssh_client
|
||||
overcloud_version = overcloud.overcloud_version
|
||||
skip_if_missing_overcloud = overcloud.skip_if_missing_overcloud
|
||||
skip_unless_has_overcloud = overcloud.skip_unless_has_overcloud
|
||||
skip_if_ceph_rgw = containers.skip_if_ceph_rgw
|
||||
|
||||
get_rhosp_release = _rhosp.get_rhosp_release
|
||||
get_rhosp_version = _rhosp.get_rhosp_version
|
||||
|
||||
@@ -74,9 +74,14 @@ OPTIONS = [
|
||||
cfg.StrOpt('inventory_file',
|
||||
default='.ansible/inventory/tripleo.yaml',
|
||||
help="path to where to export tripleo inventory file"),
|
||||
|
||||
cfg.BoolOpt('has_external_load_balancer',
|
||||
default=False,
|
||||
help="OSP env was done with an external load balancer"),
|
||||
|
||||
cfg.BoolOpt('ceph_rgw',
|
||||
default=False,
|
||||
help="whether Ceph RGW is deployed"),
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ from oslo_log import log
|
||||
import pandas
|
||||
|
||||
import tobiko
|
||||
from tobiko import config
|
||||
from tobiko import podman
|
||||
from tobiko import docker
|
||||
from tobiko.openstack import neutron
|
||||
@@ -21,6 +22,7 @@ from tobiko.tripleo import overcloud
|
||||
from tobiko.tripleo import topology as tripleo_topology
|
||||
|
||||
|
||||
CONF = config.CONF
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -332,7 +334,7 @@ def assert_all_tripleo_containers_running():
|
||||
'nova_migration_target',
|
||||
'nova_virtlogd']
|
||||
|
||||
if assert_ceph_rgw_container_running():
|
||||
if ceph_rgw_expected():
|
||||
tripleo_containers_to_check = \
|
||||
shiftonstack_controller_tripleo_containers
|
||||
else:
|
||||
@@ -357,6 +359,17 @@ def assert_ceph_rgw_container_running():
|
||||
full_name=False, bool_check=True)
|
||||
|
||||
|
||||
def ceph_rgw_expected():
|
||||
"""Returns True if 'ceph_rgw' parameter in the config file is set to 'true'
|
||||
or ceph rgw containers were detected running by Tobiko.
|
||||
"""
|
||||
return CONF.tobiko.tripleo.ceph_rgw or assert_ceph_rgw_container_running()
|
||||
|
||||
|
||||
def skip_if_ceph_rgw():
|
||||
return tobiko.skip_if('Ceph rgw deployed', ceph_rgw_expected)
|
||||
|
||||
|
||||
def osp13_container_name_short_format(container_name_long_format):
|
||||
"""This takes a long format container name :
|
||||
'rhosp13/openstack-neutron-l3-agent'
|
||||
|
||||
Reference in New Issue
Block a user