From 21055acd84d2d31af65f1b1fcaf53f7643e1ea64 Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Tue, 14 Jun 2022 20:31:09 +0000 Subject: [PATCH] Add Kinetic and Zed support * sync charm-helpers to classic charms * change openstack-origin/source default to zed * align testing with zed * add new zed bundles * add zed bundles to tests.yaml * add zed tests to osci.yaml and .zuul.yaml * update build-on and run-on bases * add bindep.txt for py310 * sync tox.ini and requirements.txt for ruamel * use charmcraft_channel 2.0/stable * drop reactive plugin overrides * move interface/layer env vars to charmcraft.yaml Change-Id: I9dda207bbd35f8641a6aac03e99503bc26071407 Depends-On: https://review.opendev.org/c/openstack/charm-ops-openstack/+/853306 --- .zuul.yaml | 2 +- charmcraft.yaml | 7 +--- config.yaml | 2 +- metadata.yaml | 3 +- osci.yaml | 42 +++++++++++++------ .../{focal-ec.yaml => kinetic-ec.yaml} | 4 +- tests/bundles/{focal.yaml => kinetic.yaml} | 4 +- tests/tests.yaml | 8 ++-- tox.ini | 2 +- unit_tests/test_ceph_iscsi_charm.py | 5 ++- 10 files changed, 46 insertions(+), 33 deletions(-) rename tests/bundles/{focal-ec.yaml => kinetic-ec.yaml} (94%) rename tests/bundles/{focal.yaml => kinetic.yaml} (93%) diff --git a/.zuul.yaml b/.zuul.yaml index 7ffc71c..23bf5f6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,4 @@ - project: templates: - - openstack-python3-charm-yoga-jobs + - openstack-python3-charm-zed-jobs - openstack-cover-jobs diff --git a/charmcraft.yaml b/charmcraft.yaml index 2321917..070bf49 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -23,13 +23,10 @@ parts: bases: - build-on: - name: ubuntu - channel: "20.04" + channel: "22.04" architectures: - amd64 run-on: - - name: ubuntu - channel: "20.04" - architectures: [amd64, s390x, ppc64el, arm64] - name: ubuntu channel: "22.04" - architectures: [amd64, s390x, ppc64el, arm64] \ No newline at end of file + architectures: [amd64, s390x, ppc64el, arm64] diff --git a/config.yaml b/config.yaml index ba1120f..9a9b79e 100644 --- a/config.yaml +++ b/config.yaml @@ -5,7 +5,7 @@ options: description: Mon and OSD debug level. Max is 20. source: type: string - default: yoga + default: zed description: | Optional configuration to support use of additional sources such as: - ppa:myteam/ppa diff --git a/metadata.yaml b/metadata.yaml index 04c1bde..78cef03 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -10,8 +10,7 @@ tags: - storage - misc series: - - focal - - jammy +- jammy subordinate: false min-juju-version: 2.7.6 extra-bindings: diff --git a/osci.yaml b/osci.yaml index 04fd9c7..6f7edc1 100644 --- a/osci.yaml +++ b/osci.yaml @@ -1,29 +1,47 @@ - project: templates: - - charm-unit-jobs-py38 - - charm-unit-jobs-py39 + - charm-unit-jobs-py310 check: jobs: - - ceph-iscsi-focal-octopus - - ceph-iscsi-focal-octopus-ec + - ceph-iscsi-jammy-quincy + - ceph-iscsi-jammy-quincy-ec + - ceph-iscsi-kinetic-quincy: + voting: false + - ceph-iscsi-kinetic-quincy-ec: + voting: false vars: needs_charm_build: true charm_build_name: ceph-iscsi build_type: charmcraft + charmcraft_channel: 2.0/stable - job: - name: ceph-iscsi-focal-octopus + name: ceph-iscsi-jammy-quincy parent: func-target dependencies: - charm-build - osci-lint - - tox-py38 - - tox-py39 + - name: tox-py310 + soft: true vars: - tox_extra_args: focal + tox_extra_args: jammy - job: - name: ceph-iscsi-focal-octopus-ec + name: ceph-iscsi-jammy-quincy-ec parent: func-target - dependencies: &smoke-jobs - - ceph-iscsi-focal-octopus + dependencies: + - ceph-iscsi-jammy-quincy vars: - tox_extra_args: focal-ec + tox_extra_args: jammy-ec +- job: + name: ceph-iscsi-kinetic-quincy + parent: func-target + dependencies: + - ceph-iscsi-jammy-quincy + vars: + tox_extra_args: kinetic +- job: + name: ceph-iscsi-kinetic-quincy-ec + parent: func-target + dependencies: + - ceph-iscsi-jammy-quincy + vars: + tox_extra_args: kinetic-ec diff --git a/tests/bundles/focal-ec.yaml b/tests/bundles/kinetic-ec.yaml similarity index 94% rename from tests/bundles/focal-ec.yaml rename to tests/bundles/kinetic-ec.yaml index a381c85..d2fc1a7 100644 --- a/tests/bundles/focal-ec.yaml +++ b/tests/bundles/kinetic-ec.yaml @@ -1,5 +1,5 @@ local_overlay_enabled: False -series: focal +series: kinetic machines: '0': '1': @@ -36,8 +36,6 @@ applications: pool-type: erasure-coded ec-profile-k: 4 ec-profile-m: 2 - # Use proposed until fix for #1883112 is backported - source: distro-proposed to: - '0' - '1' diff --git a/tests/bundles/focal.yaml b/tests/bundles/kinetic.yaml similarity index 93% rename from tests/bundles/focal.yaml rename to tests/bundles/kinetic.yaml index ee42dbf..e674318 100644 --- a/tests/bundles/focal.yaml +++ b/tests/bundles/kinetic.yaml @@ -1,5 +1,5 @@ local_overlay_enabled: False -series: focal +series: kinetic machines: '0': '1': @@ -35,8 +35,6 @@ applications: num_units: 4 options: gateway-metadata-pool: iscsi-foo-metadata - # Use proposed until fix for #1883112 is backported - source: distro-proposed to: - '0' - '1' diff --git a/tests/tests.yaml b/tests/tests.yaml index 6f0ce1b..a33948e 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -1,12 +1,14 @@ charm_name: ceph-iscsi gate_bundles: - - focal-ec - - focal + - jammy-ec + - jammy smoke_bundles: - - focal + - jammy dev_bundles: - jammy-ec - jammy + - kinetic-ec + - kinetic configure: - zaza.openstack.charm_tests.vault.setup.auto_initialize_no_validation - zaza.openstack.charm_tests.ceph.iscsi.setup.basic_guest_setup diff --git a/tox.ini b/tox.ini index c50ea0f..c855061 100644 --- a/tox.ini +++ b/tox.ini @@ -118,7 +118,7 @@ basepython = python3 deps = -r{toxinidir}/build-requirements.txt commands = charmcraft clean - charmcraft -v build + charmcraft -v pack {toxinidir}/rename.sh [testenv:func-noop] diff --git a/unit_tests/test_ceph_iscsi_charm.py b/unit_tests/test_ceph_iscsi_charm.py index 850e999..b5d3083 100644 --- a/unit_tests/test_ceph_iscsi_charm.py +++ b/unit_tests/test_ceph_iscsi_charm.py @@ -173,8 +173,9 @@ class TestCephISCSIGatewayCharmBase(CharmTestCase): 'egress-subnets': ['10.0.0.0/24']} return network_data + config_ = self.harness._get_config(charm_config=None) self.harness._backend = _TestingOPSModelBackend( - self.harness._unit_name, self.harness._meta) + self.harness._unit_name, self.harness._meta, config_) self.harness._model = model.Model( self.harness._meta, self.harness._backend) @@ -398,7 +399,7 @@ class TestCephISCSIGatewayCharmBase(CharmTestCase): rel_id, 'ceph-iscsi', {'admin_password': 'existing password', - 'gateway_ready': False}) + 'gateway_ready': 'False'}) self.harness.begin() self.harness.charm.ceph_client._stored.pools_available = True with patch.object(Path, 'mkdir') as mock_mkdir: