From 3dff521036ccda5a3466db4c6f623b739d7782cb Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Thu, 2 Apr 2020 16:03:26 +0100 Subject: [PATCH] Add focal-ussuri and bionic-ussuri bundles This patch adds the following bundles: * tests/bundles/bionic-ussuri-namespaced.yaml * tests/bundles/bionic-ussuri.yaml * tests/bundles/focal-ussuri-namespaced.yaml * tests/bundles/focal-ussuri.yaml The focal tests uses the force_deploy option in the tests.yaml The depends-on is to fix very recent lint errors in charms.ceph with E741 (very short variable names). Change-Id: I46445da361e37716b65bf941f687cbd6468ed212 Depends-On: Id92956e52cefed6d3d792dd95fe7091788fb2d1b --- actions/actions.py | 2 +- lib/charms_ceph/utils.py | 4 +- metadata.yaml | 1 + tests/bundles/bionic-ussuri-namespaced.yaml | 43 +++++++++ tests/bundles/bionic-ussuri.yaml | 42 +++++++++ tests/bundles/focal-ussuri-namespaced.yaml | 96 +++++++++++++++++++++ tests/bundles/focal-ussuri.yaml | 94 ++++++++++++++++++++ tests/tests.yaml | 8 ++ 8 files changed, 287 insertions(+), 3 deletions(-) create mode 100644 tests/bundles/bionic-ussuri-namespaced.yaml create mode 100644 tests/bundles/bionic-ussuri.yaml create mode 100644 tests/bundles/focal-ussuri-namespaced.yaml create mode 100644 tests/bundles/focal-ussuri.yaml diff --git a/actions/actions.py b/actions/actions.py index c0c23e3b..ddbdde04 100755 --- a/actions/actions.py +++ b/actions/actions.py @@ -119,7 +119,7 @@ def tidydefaults(args): ) except subprocess.CalledProcessError as cpe: action_fail('Unable delete default zone and zonegroup' - ': {}'.format(zone, cpe.output)) + ': {} - {}'.format(zone, cpe.output)) # A dictionary of all the defined actions to callables (which take diff --git a/lib/charms_ceph/utils.py b/lib/charms_ceph/utils.py index a3fd276d..1152bda9 100644 --- a/lib/charms_ceph/utils.py +++ b/lib/charms_ceph/utils.py @@ -1481,11 +1481,11 @@ def get_devices(name): :returns: Set(device names), which are strings """ if config(name): - devices = [l.strip() for l in config(name).split(' ')] + devices = [dev.strip() for dev in config(name).split(' ')] else: devices = [] storage_ids = storage_list(name) - devices.extend((storage_get('location', s) for s in storage_ids)) + devices.extend((storage_get('location', sid) for sid in storage_ids)) devices = filter(os.path.exists, devices) return set(devices) diff --git a/metadata.yaml b/metadata.yaml index 5d483d76..40e6099b 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -16,6 +16,7 @@ series: - xenial - bionic - eoan + - focal - trusty extra-bindings: public: diff --git a/tests/bundles/bionic-ussuri-namespaced.yaml b/tests/bundles/bionic-ussuri-namespaced.yaml new file mode 100644 index 00000000..ffa56dcd --- /dev/null +++ b/tests/bundles/bionic-ussuri-namespaced.yaml @@ -0,0 +1,43 @@ +options: + source: &source cloud:bionic-ussuri +series: bionic +applications: + ceph-radosgw: + charm: ceph-radosgw + series: bionic + num_units: 1 + options: + source: *source + namespace-tenants: True + ceph-osd: + charm: cs:~openstack-charmers-next/ceph-osd + num_units: 3 + constraints: "mem=2048" + storage: + osd-devices: 'cinder,10G' + options: + source: *source + osd-devices: '/srv/ceph /dev/test-non-existent' + ceph-mon: + charm: cs:~openstack-charmers-next/ceph-mon + num_units: 3 + options: + source: *source + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *source +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - ceph-osd:mon + - ceph-mon:osd +- - ceph-radosgw:mon + - ceph-mon:radosgw +- - ceph-radosgw:identity-service + - keystone:identity-service diff --git a/tests/bundles/bionic-ussuri.yaml b/tests/bundles/bionic-ussuri.yaml new file mode 100644 index 00000000..80954374 --- /dev/null +++ b/tests/bundles/bionic-ussuri.yaml @@ -0,0 +1,42 @@ +options: + source: &source cloud:bionic-ussuri +series: bionic +applications: + ceph-radosgw: + charm: ceph-radosgw + series: bionic + num_units: 1 + options: + source: *source + ceph-osd: + charm: cs:~openstack-charmers-next/ceph-osd + num_units: 3 + constraints: "mem=2048" + storage: + osd-devices: 'cinder,10G' + options: + source: *source + osd-devices: '/srv/ceph /dev/test-non-existent' + ceph-mon: + charm: cs:~openstack-charmers-next/ceph-mon + num_units: 3 + options: + source: *source + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *source +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - ceph-osd:mon + - ceph-mon:osd +- - ceph-radosgw:mon + - ceph-mon:radosgw +- - ceph-radosgw:identity-service + - keystone:identity-service diff --git a/tests/bundles/focal-ussuri-namespaced.yaml b/tests/bundles/focal-ussuri-namespaced.yaml new file mode 100644 index 00000000..e90e0c91 --- /dev/null +++ b/tests/bundles/focal-ussuri-namespaced.yaml @@ -0,0 +1,96 @@ +options: + source: &source distro + +series: focal + +comment: +- 'machines section to decide order of deployment. database sooner = faster' +machines: + '0': + constraints: mem=3072M + '1': + constraints: mem=3072M + '2': + constraints: mem=3072M + '3': + '4': + '5': + '6': + '7': + '8': + '9': + '10': + +applications: + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + + mysql-innodb-cluster: + charm: cs:~openstack-charmers-next/mysql-innodb-cluster + num_units: 3 + options: + source: *source + to: + - '0' + - '1' + - '2' + + ceph-radosgw: + charm: ceph-radosgw + num_units: 1 + options: + source: *source + namespace-tenants: True + to: + - '3' + + ceph-osd: + charm: cs:~openstack-charmers-next/ceph-osd + num_units: 3 + constraints: "mem=2048" + storage: + osd-devices: 'cinder,10G' + options: + source: *source + osd-devices: '/srv/ceph /dev/test-non-existent' + to: + - '4' + - '5' + - '6' + + ceph-mon: + charm: cs:~openstack-charmers-next/ceph-mon + num_units: 3 + options: + source: *source + to: + - '7' + - '8' + - '9' + + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *source + to: + - '10' + +relations: + + - - 'keystone:shared-db' + - 'keystone-mysql-router:shared-db' + - - 'keystone-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'ceph-osd:mon' + - 'ceph-mon:osd' + + - - 'ceph-radosgw:mon' + - 'ceph-mon:radosgw' + + - - 'ceph-radosgw:identity-service' + - 'keystone:identity-service' + diff --git a/tests/bundles/focal-ussuri.yaml b/tests/bundles/focal-ussuri.yaml new file mode 100644 index 00000000..e5003281 --- /dev/null +++ b/tests/bundles/focal-ussuri.yaml @@ -0,0 +1,94 @@ +options: + source: &source distro + +series: focal + +comment: +- 'machines section to decide order of deployment. database sooner = faster' +machines: + '0': + constraints: mem=3072M + '1': + constraints: mem=3072M + '2': + constraints: mem=3072M + '3': + '4': + '5': + '6': + '7': + '8': + '9': + '10': + +applications: + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + + mysql-innodb-cluster: + charm: cs:~openstack-charmers-next/mysql-innodb-cluster + num_units: 3 + options: + source: *source + to: + - '0' + - '1' + - '2' + + ceph-radosgw: + charm: ceph-radosgw + num_units: 1 + options: + source: *source + to: + - '3' + + ceph-osd: + charm: cs:~openstack-charmers-next/ceph-osd + num_units: 3 + constraints: "mem=2048" + storage: + osd-devices: 'cinder,10G' + options: + source: *source + osd-devices: '/srv/ceph /dev/test-non-existent' + to: + - '4' + - '5' + - '6' + + ceph-mon: + charm: cs:~openstack-charmers-next/ceph-mon + num_units: 3 + options: + source: *source + to: + - '7' + - '8' + - '9' + + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *source + to: + - '10' + +relations: + + - - 'keystone:shared-db' + - 'keystone-mysql-router:shared-db' + - - 'keystone-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'ceph-osd:mon' + - 'ceph-mon:osd' + + - - 'ceph-radosgw:mon' + - 'ceph-mon:radosgw' + + - - 'ceph-radosgw:identity-service' + - 'keystone:identity-service' diff --git a/tests/tests.yaml b/tests/tests.yaml index e631981a..49b65c19 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -1,5 +1,9 @@ charm_name: ceph-radosgw gate_bundles: + - test-s3api: focal-ussuri + - test-s3api: focal-ussuri-namespaced + - test-s3api: bionic-ussuri + - test-s3api: bionic-ussuri-namespaced - test-s3api: bionic-train - test-s3api: bionic-train-namespaced - test-s3api: bionic-stein @@ -24,3 +28,7 @@ tests: - test-s3api: - zaza.openstack.charm_tests.ceph.tests.CephRGWTest - zaza.openstack.charm_tests.swift.tests.S3APITest +tests_options: + force_deploy: + - focal-ussuri + - focal-ussuri-namespaced