From d448514464323246f31efbe4bb6e445100f6121a Mon Sep 17 00:00:00 2001 From: Luciano Lo Giudice Date: Fri, 2 Jun 2023 17:38:39 -0300 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 * fix poetry-core addition in wheelhouse Change-Id: Ia2ad44152cf620e9812bfbd58276735a7491949c --- .zuul.yaml | 2 +- bindep.txt | 1 + build-requirements.txt | 1 + charmcraft.yaml | 5 +- osci.yaml | 7 +- src/tests/bundles/jammy-zed.yaml | 186 +++++++++++++++++++++++++++++ src/tests/bundles/kinetic-zed.yaml | 186 +++++++++++++++++++++++++++++ src/tests/tests.yaml | 10 +- src/wheelhouse.txt | 2 +- test-requirements.txt | 18 +-- tox.ini | 22 ++-- 11 files changed, 399 insertions(+), 41 deletions(-) create mode 100644 src/tests/bundles/jammy-zed.yaml create mode 100644 src/tests/bundles/kinetic-zed.yaml diff --git a/.zuul.yaml b/.zuul.yaml index fd189e2..75fc2a7 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,3 +1,3 @@ - project: templates: - - openstack-python3-ussuri-jobs + - openstack-python3-charm-zed-jobs diff --git a/bindep.txt b/bindep.txt index bdbe8d5..17575d9 100644 --- a/bindep.txt +++ b/bindep.txt @@ -1,3 +1,4 @@ libffi-dev [platform:dpkg] +libpq-dev [platform:dpkg] libxml2-dev [platform:dpkg] libxslt1-dev [platform:dpkg] diff --git a/build-requirements.txt b/build-requirements.txt index b6d2452..ff4b357 100644 --- a/build-requirements.txt +++ b/build-requirements.txt @@ -5,3 +5,4 @@ # * `tox -e build` successfully validated with charmcraft 1.2.1 cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. +markupsafe<=2 diff --git a/charmcraft.yaml b/charmcraft.yaml index 0b70679..366bcbe 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -17,10 +17,13 @@ parts: bases: - build-on: - name: ubuntu - channel: "22.04" + channel: "20.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] diff --git a/osci.yaml b/osci.yaml index d196797..5caf470 100644 --- a/osci.yaml +++ b/osci.yaml @@ -2,11 +2,8 @@ templates: - charm-unit-jobs-py38 - charm-unit-jobs-py310 - check: - jobs: - - focal-yoga - - jammy-yoga: - voting: false + - charm-yoga-functional-jobs + - charm-zed-functional-jobs vars: needs_charm_build: true charm_build_name: ceph-rbd-mirror diff --git a/src/tests/bundles/jammy-zed.yaml b/src/tests/bundles/jammy-zed.yaml new file mode 100644 index 0000000..4c21f31 --- /dev/null +++ b/src/tests/bundles/jammy-zed.yaml @@ -0,0 +1,186 @@ +variables: + openstack-origin: &openstack-origin cloud:jammy-zed + +local_overlay_enabled: False + +series: &series jammy + +machines: + '0': + constraints: "mem=3072M" + '1': + constraints: "mem=3072M" + '2': + constraints: "mem=3072M" + +applications: + + keystone-mysql-router: + charm: ch:mysql-router + channel: latest/edge + glance-mysql-router: + charm: ch:mysql-router + channel: latest/edge + cinder-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 + + keystone: + charm: ch:keystone + num_units: 1 + options: + openstack-origin: *openstack-origin + channel: latest/edge + + rabbitmq-server: + charm: ch:rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + channel: latest/edge + + cinder: + charm: ch:cinder + num_units: 1 + options: + block-device: None + glance-api-version: 2 + channel: latest/edge + + cinder-ceph: + charm: ch:cinder-ceph + num_units: 0 + channel: latest/edge + + glance: + charm: ch:glance + num_units: 1 + options: + openstack-origin: *openstack-origin + channel: latest/edge + + nova-compute: + charm: ch:nova-compute + num_units: 1 + options: + openstack-origin: *openstack-origin + channel: latest/edge + + ceph-mon: + charm: ch:ceph-mon + num_units: 3 + options: + expected-osd-count: 3 + source: *openstack-origin + channel: quincy/edge + + ceph-osd: + charm: ch:ceph-osd + num_units: 3 + storage: + osd-devices: 'cinder,10G' + options: + source: *openstack-origin + bluestore: False + use-direct-io: False + osd-devices: '/dev/test-non-existent' + channel: quincy/edge + + ceph-rbd-mirror: + series: *series + charm: ../../../ceph-rbd-mirror.charm + num_units: 1 + options: + source: *openstack-origin + + ceph-mon-b: + charm: ch:ceph-mon + num_units: 3 + options: + expected-osd-count: 3 + source: *openstack-origin + channel: quincy/edge + + ceph-osd-b: + charm: ch:ceph-osd + num_units: 3 + storage: + osd-devices: 'cinder,10G' + options: + source: *openstack-origin + bluestore: False + use-direct-io: False + osd-devices: '/dev/test-non-existent' + channel: quincy/edge + + ceph-rbd-mirror-b: + series: *series + charm: ../../../ceph-rbd-mirror.charm + num_units: 1 + options: + source: *openstack-origin + +relations: + +- - keystone:shared-db + - keystone-mysql-router:shared-db +- - keystone-mysql-router:db-router + - mysql-innodb-cluster:db-router + +- - glance:shared-db + - glance-mysql-router:shared-db +- - glance-mysql-router:db-router + - mysql-innodb-cluster:db-router + +- - cinder:shared-db + - cinder-mysql-router:shared-db +- - cinder-mysql-router:db-router + - mysql-innodb-cluster:db-router + +- - rabbitmq-server + - cinder + +- - 'keystone:identity-service' + - cinder +- - 'keystone:identity-service' + - glance + +- - cinder + - cinder-ceph +- - cinder-ceph:ceph + - ceph-mon:client + +- - nova-compute:ceph-access + - cinder-ceph:ceph-access +- - nova-compute:amqp + - rabbitmq-server:amqp + +- - glance:image-service + - nova-compute:image-service +- - glance + - ceph-mon + +- - ceph-mon:osd + - ceph-osd:mon +- - ceph-mon + - ceph-rbd-mirror:ceph-local +- - ceph-mon + - ceph-rbd-mirror-b:ceph-remote + +- - ceph-mon-b:osd + - ceph-osd-b:mon +- - ceph-mon-b + - ceph-rbd-mirror-b:ceph-local +- - ceph-mon-b + - ceph-rbd-mirror:ceph-remote diff --git a/src/tests/bundles/kinetic-zed.yaml b/src/tests/bundles/kinetic-zed.yaml new file mode 100644 index 0000000..e093f8f --- /dev/null +++ b/src/tests/bundles/kinetic-zed.yaml @@ -0,0 +1,186 @@ +variables: + openstack-origin: &openstack-origin distro + +local_overlay_enabled: False + +series: &series kinetic + +machines: + '0': + constraints: "mem=3072M" + '1': + constraints: "mem=3072M" + '2': + constraints: "mem=3072M" + +applications: + + keystone-mysql-router: + charm: ch:mysql-router + channel: latest/edge + glance-mysql-router: + charm: ch:mysql-router + channel: latest/edge + cinder-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 + + keystone: + charm: ch:keystone + num_units: 1 + options: + openstack-origin: *openstack-origin + channel: latest/edge + + rabbitmq-server: + charm: ch:rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + channel: latest/edge + + cinder: + charm: ch:cinder + num_units: 1 + options: + block-device: None + glance-api-version: 2 + channel: latest/edge + + cinder-ceph: + charm: ch:cinder-ceph + num_units: 0 + channel: latest/edge + + glance: + charm: ch:glance + num_units: 1 + options: + openstack-origin: *openstack-origin + channel: latest/edge + + nova-compute: + charm: ch:nova-compute + num_units: 1 + options: + openstack-origin: *openstack-origin + channel: latest/edge + + ceph-mon: + charm: ch:ceph-mon + num_units: 3 + options: + expected-osd-count: 3 + source: *openstack-origin + channel: quincy/edge + + ceph-osd: + charm: ch:ceph-osd + num_units: 3 + storage: + osd-devices: 'cinder,10G' + options: + source: *openstack-origin + bluestore: False + use-direct-io: False + osd-devices: '/dev/test-non-existent' + channel: quincy/edge + + ceph-rbd-mirror: + series: *series + charm: ../../../ceph-rbd-mirror.charm + num_units: 1 + options: + source: *openstack-origin + + ceph-mon-b: + charm: ch:ceph-mon + num_units: 3 + options: + expected-osd-count: 3 + source: *openstack-origin + channel: quincy/edge + + ceph-osd-b: + charm: ch:ceph-osd + num_units: 3 + storage: + osd-devices: 'cinder,10G' + options: + source: *openstack-origin + bluestore: False + use-direct-io: False + osd-devices: '/dev/test-non-existent' + channel: quincy/edge + + ceph-rbd-mirror-b: + series: *series + charm: ../../../ceph-rbd-mirror.charm + num_units: 1 + options: + source: *openstack-origin + +relations: + +- - keystone:shared-db + - keystone-mysql-router:shared-db +- - keystone-mysql-router:db-router + - mysql-innodb-cluster:db-router + +- - glance:shared-db + - glance-mysql-router:shared-db +- - glance-mysql-router:db-router + - mysql-innodb-cluster:db-router + +- - cinder:shared-db + - cinder-mysql-router:shared-db +- - cinder-mysql-router:db-router + - mysql-innodb-cluster:db-router + +- - rabbitmq-server + - cinder + +- - 'keystone:identity-service' + - cinder +- - 'keystone:identity-service' + - glance + +- - cinder + - cinder-ceph +- - cinder-ceph:ceph + - ceph-mon:client + +- - nova-compute:ceph-access + - cinder-ceph:ceph-access +- - nova-compute:amqp + - rabbitmq-server:amqp + +- - glance:image-service + - nova-compute:image-service +- - glance + - ceph-mon + +- - ceph-mon:osd + - ceph-osd:mon +- - ceph-mon + - ceph-rbd-mirror:ceph-local +- - ceph-mon + - ceph-rbd-mirror-b:ceph-remote + +- - ceph-mon-b:osd + - ceph-osd-b:mon +- - ceph-mon-b + - ceph-rbd-mirror-b:ceph-local +- - ceph-mon-b + - ceph-rbd-mirror:ceph-remote diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index 117d828..c318138 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -14,6 +14,10 @@ dev_bundles: - focal-yoga-image-mirroring - jammy-yoga - jammy-yoga-image-mirroring +- jammy-zed +- jammy-zed-image-mirroring +- kinetic-zed +- kinetic-zed-image-mirroring configure: - zaza.openstack.charm_tests.glance.setup.add_cirros_image - zaza.openstack.charm_tests.glance.setup.add_lts_image @@ -23,7 +27,5 @@ tests: - zaza.openstack.charm_tests.ceph.rbd_mirror.tests.CephRBDMirrorDisasterFailoverTest tests_options: force_deploy: - - impish-xena - - impish-xena-image-mirroring - - jammy-yoga - - jammy-yoga-image-mirroring + - kinetic-zed + - kinetic-zed-image-mirroring diff --git a/src/wheelhouse.txt b/src/wheelhouse.txt index 10f9a4e..04ab38c 100644 --- a/src/wheelhouse.txt +++ b/src/wheelhouse.txt @@ -1,4 +1,4 @@ git+https://github.com/juju/charm-helpers.git#egg=charmhelpers psutil - +poetry-core git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack diff --git a/test-requirements.txt b/test-requirements.txt index a11a7d0..a7936e6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,6 @@ # https://github.com/openstack-charmers/release-tools # pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here. -cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 stestr>=2.2.0 @@ -13,25 +12,10 @@ stestr>=2.2.0 # https://github.com/mtreinish/stestr/issues/145 cliff<3.0.0 -# Dependencies of stestr. Newer versions use keywords that didn't exist in -# python 3.5 yet (e.g. "ModuleNotFoundError") -importlib-metadata<3.0.0; python_version < '3.6' -importlib-resources<3.0.0; python_version < '3.6' - -# Some Zuul nodes sometimes pull newer versions of these dependencies which -# dropped support for python 3.5: -osprofiler<2.7.0;python_version<'3.6' -stevedore<1.31.0;python_version<'3.6' -debtcollector<1.22.0;python_version<'3.6' -oslo.utils<=3.41.0;python_version<'3.6' - requests>=2.18.4 charms.reactive -# Newer mock seems to have some syntax which is newer than python3.5 (e.g. -# f'{something}' -mock>=1.2,<4.0.0; python_version < '3.6' -mock>=1.2; python_version >= '3.6' +mock>=1.2 nose>=1.3.7 coverage>=3.6 diff --git a/tox.ini b/tox.ini index c028e9a..af776db 100644 --- a/tox.ini +++ b/tox.ini @@ -19,8 +19,6 @@ skip_install = True setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 TERM=linux - LAYER_PATH={toxinidir}/layers - INTERFACE_PATH={toxinidir}/interfaces JUJU_REPOSITORY={toxinidir}/build CHARM_LAYERS_DIR={toxinidir}/layers CHARM_INTERFACES_DIR={toxinidir}/interfaces @@ -66,21 +64,21 @@ basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} -[testenv:py36] -basepython = python3.6 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py37] -basepython = python3.7 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - [testenv:py38] basepython = python3.8 deps = -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} +[testenv:py39] +basepython = python3.9 +deps = -r{toxinidir}/test-requirements.txt +commands = stestr run --slowest {posargs} + +[testenv:py310] +basepython = python3.10 +deps = -r{toxinidir}/test-requirements.txt +commands = stestr run --slowest {posargs} + [testenv:pep8] basepython = python3 deps = flake8==3.9.2