From 9aaf2d6f886407b2bc81864911c5385c3aa12986 Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Tue, 18 Jul 2023 16:47:18 -0400 Subject: [PATCH] Add 2023.2 Bobcat support * sync charm-helpers to classic charms * change openstack-origin/source default to bobcat * add mantic to metadata series * align testing with bobcat * add new bobcat bundles * add bobcat bundles to tests.yaml * add bobcat tests to osci.yaml * update build-on and run-on bases * drop kinetic * patch charmhelpers.core.hookenv.is_subordinate due to new release handlings in charms.openstack: https://github.com/openstack/charms.openstack/commit/fd042afdf186ab419ee35ea9678735895c62b723 Change-Id: I9269ad8b11b2ad5ee8a9868bf23ab1710758c883 --- charmcraft.yaml | 6 +- src/config.yaml | 2 +- src/metadata.yaml | 2 +- .../{jammy-zed.yaml => jammy-bobcat.yaml} | 5 +- src/tests/bundles/mantic-bobcat.yaml | 180 ++++++++++++++++++ src/tests/tests.yaml | 8 +- unit_tests/test_lib_charm_openstack_aodh.py | 2 + 7 files changed, 193 insertions(+), 12 deletions(-) rename src/tests/bundles/{jammy-zed.yaml => jammy-bobcat.yaml} (96%) create mode 100644 src/tests/bundles/mantic-bobcat.yaml diff --git a/charmcraft.yaml b/charmcraft.yaml index 00d4019..2df13f1 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -22,9 +22,9 @@ bases: - name: ubuntu channel: "22.04" architectures: [amd64, s390x, ppc64el, arm64] - - name: ubuntu - channel: "22.10" - architectures: [amd64, s390x, ppc64el, arm64] - name: ubuntu channel: "23.04" architectures: [amd64, s390x, ppc64el, arm64] + - name: ubuntu + channel: "23.10" + architectures: [amd64, s390x, ppc64el, arm64] diff --git a/src/config.yaml b/src/config.yaml index 0a403ff..8886f97 100644 --- a/src/config.yaml +++ b/src/config.yaml @@ -22,4 +22,4 @@ options: description: | Comma separated list of nagios servicegroups for the service checks. openstack-origin: - default: antelope + default: bobcat diff --git a/src/metadata.yaml b/src/metadata.yaml index 5929813..619d134 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -14,8 +14,8 @@ tags: - openstack series: - jammy -- kinetic - lunar +- mantic subordinate: false requires: mongodb: diff --git a/src/tests/bundles/jammy-zed.yaml b/src/tests/bundles/jammy-bobcat.yaml similarity index 96% rename from src/tests/bundles/jammy-zed.yaml rename to src/tests/bundles/jammy-bobcat.yaml index d37af9c..0498c2e 100644 --- a/src/tests/bundles/jammy-zed.yaml +++ b/src/tests/bundles/jammy-bobcat.yaml @@ -1,7 +1,7 @@ local_overlay_enabled: False variables: - openstack-origin: &openstack-origin cloud:jammy-zed + openstack-origin: &openstack-origin cloud:jammy-bobcat series: jammy @@ -89,8 +89,6 @@ applications: num_units: 3 storage: osd-devices: 'cinder,10G' - options: - source: *openstack-origin to: - '7' - '8' @@ -103,7 +101,6 @@ applications: options: expected-osd-count: 3 monitor-count: '3' - source: *openstack-origin to: - '10' - '11' diff --git a/src/tests/bundles/mantic-bobcat.yaml b/src/tests/bundles/mantic-bobcat.yaml new file mode 100644 index 0000000..a7881a0 --- /dev/null +++ b/src/tests/bundles/mantic-bobcat.yaml @@ -0,0 +1,180 @@ +local_overlay_enabled: False + +variables: + openstack-origin: &openstack-origin distro + +series: mantic + +machines: + 0: + constraints: "mem=3072M" + 1: + constraints: "mem=3072M" + 2: + constraints: "mem=3072M" + 3: + 4: + 5: + 6: + 7: + 8: + 9: + 10: + 11: + 12: + 13: + 14: + series: focal + +# We specify machine placements for these to improve iteration +# time, given that machine "0" comes up way before machine "7" +applications: + + keystone-mysql-router: + charm: ch:mysql-router + channel: latest/edge + aodh-mysql-router: + charm: ch:mysql-router + channel: latest/edge + gnocchi-mysql-router: + charm: ch:mysql-router + channel: latest/edge + + mysql-innodb-cluster: + charm: ch:mysql-innodb-cluster + num_units: 3 + options: + source: *openstack-origin + to: + - '0' + - '1' + - '2' + channel: latest/edge + + aodh: + charm: ../../../aodh.charm + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '3' + + rabbitmq-server: + charm: ch:rabbitmq-server + num_units: 1 + to: + - '4' + channel: latest/edge + + keystone: + charm: ch:keystone + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '5' + channel: latest/edge + + ceilometer: + charm: ch:ceilometer + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '6' + channel: latest/edge + + ceph-osd: + charm: ch:ceph-osd + num_units: 3 + storage: + osd-devices: 'cinder,10G' + to: + - '7' + - '8' + - '9' + channel: latest/edge + + ceph-mon: + charm: ch:ceph-mon + num_units: 3 + options: + expected-osd-count: 3 + monitor-count: '3' + to: + - '10' + - '11' + - '12' + channel: latest/edge + + gnocchi: + charm: ch:gnocchi + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '13' + channel: latest/edge + + memcached: + charm: ch:memcached + num_units: 1 + # Note that holding memcached at focal as it's not available at mantic yet. + series: focal + to: + - '14' + + nrpe: + charm: ch:nrpe + channel: latest/edge + +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' + + - - 'aodh:shared-db' + - 'aodh-mysql-router:shared-db' + - - 'aodh-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'aodh:amqp' + - 'rabbitmq-server:amqp' + + - - 'aodh:identity-service' + - 'keystone:identity-service' + + - - 'ceilometer:amqp' + - 'rabbitmq-server:amqp' + + - - 'ceilometer:identity-credentials' + - 'keystone:identity-credentials' + + - - 'ceilometer:identity-notifications' + - 'keystone:identity-notifications' + + - - 'ceilometer:metric-service' + - 'gnocchi:metric-service' + + - - 'gnocchi:identity-service' + - 'keystone:identity-service' + + - - 'gnocchi:shared-db' + - 'gnocchi-mysql-router:shared-db' + - - 'gnocchi-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'gnocchi:storage-ceph' + - 'ceph-mon:client' + + - - 'gnocchi:coordinator-memcached' + - 'memcached:cache' + + - - 'aodh:nrpe-external-master' + - 'nrpe:nrpe-external-master' diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index 268267b..0760f1f 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -1,10 +1,11 @@ charm_name: aodh gate_bundles: - - jammy-zed -dev_bundles: - jammy-antelope +dev_bundles: + - jammy-bobcat - lunar-antelope + - mantic-bobcat smoke_bundles: - jammy-yoga tests: @@ -25,6 +26,7 @@ tests_options: force_deploy: # nrpe charm doesn't support jammy+ and needs to be force installed # https://bugs.launchpad.net/charm-nrpe/+bug/1968008 - - jammy-zed - jammy-antelope + - jammy-bobcat - lunar-antelope + - mantic-bobcat diff --git a/unit_tests/test_lib_charm_openstack_aodh.py b/unit_tests/test_lib_charm_openstack_aodh.py index fb4d6d9..9bd59e0 100644 --- a/unit_tests/test_lib_charm_openstack_aodh.py +++ b/unit_tests/test_lib_charm_openstack_aodh.py @@ -23,6 +23,8 @@ class Helper(test_utils.PatchHelper): def setUp(self): super().setUp() + self.patch('charmhelpers.core.hookenv.is_subordinate', + return_value=False) self.patch_release(aodh.AodhCharm.release)