From 60e243dbf094266182539be663e6d6809cd619ce Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Fri, 29 Oct 2021 17:00:39 -0400 Subject: [PATCH] Add yoga bundles and release-tool syncs * charm-helpers sync for classic charms * pin pyparsing for aodhclient * pin cffi for py35 * add non-voting focal-yoga bundle * add non-voting jammy-yoga bundle * add series metadata for jammy * switch xena bundles to voting * run focal-ussuri as smoke tests * remove trusty, xenial, and groovy metadata and tests Change-Id: I3d5670334344384fb8be5855926f2c9441f793ba --- osci.yaml | 50 ++++++++- pip.sh | 18 ++++ requirements.txt | 1 + src/metadata.yaml | 1 - .../{xenial-pike.yaml => focal-xena.yaml} | 101 +++++++++++++----- .../{xenial-queens.yaml => focal-yoga.yaml} | 101 +++++++++++++----- ...{groovy-victoria.yaml => impish-xena.yaml} | 3 +- ...a-image-mirroring.yaml => jammy-yoga.yaml} | 7 +- src/tests/tests.yaml | 47 ++++---- src/tox.ini | 4 +- test-requirements.txt | 2 + tox.ini | 17 ++- 12 files changed, 272 insertions(+), 80 deletions(-) create mode 100755 pip.sh rename src/tests/bundles/{xenial-pike.yaml => focal-xena.yaml} (57%) rename src/tests/bundles/{xenial-queens.yaml => focal-yoga.yaml} (57%) rename src/tests/bundles/{groovy-victoria.yaml => impish-xena.yaml} (98%) rename src/tests/bundles/{groovy-victoria-image-mirroring.yaml => jammy-yoga.yaml} (95%) diff --git a/osci.yaml b/osci.yaml index e7ae6cc..1713f49 100644 --- a/osci.yaml +++ b/osci.yaml @@ -6,6 +6,18 @@ - bionic-train_ceph-rbd-mirror - bionic-stein_ceph-rbd-mirror - bionic-queens_ceph-rbd-mirror + - bionic-ussuri_ceph-rbd-mirror + - focal-ussuri_ceph-rbd-mirror + - focal-victoria_ceph-rbd-mirror + - focal-wallaby_ceph-rbd-mirror + - focal-xena_ceph-rbd-mirror + - focal-yoga_ceph-rbd-mirror: + voting: false + - hirsute-wallaby_ceph-rbd-mirror + - impish-xena_ceph-rbd-mirror: + voting: false + - jammy-yoga_ceph-rbd-mirror: + voting: false vars: needs_charm_build: true charm_build_name: ceph-rbd-mirror @@ -27,4 +39,40 @@ - job: name: bionic-stein_ceph-rbd-mirror parent: bionic-stein - dependencies: *smoke-jobs \ No newline at end of file + dependencies: *smoke-jobs +- job: + name: bionic-ussuri_ceph-rbd-mirror + parent: bionic-stein + dependencies: *smoke-jobs +- job: + name: focal-ussuri_ceph-rbd-mirror + parent: bionic-stein + dependencies: *smoke-jobs +- job: + name: focal-victoria_ceph-rbd-mirror + parent: bionic-stein + dependencies: *smoke-jobs +- job: + name: focal-wallaby_ceph-rbd-mirror + parent: bionic-stein + dependencies: *smoke-jobs +- job: + name: focal-xena_ceph-rbd-mirror + parent: bionic-stein + dependencies: *smoke-jobs +- job: + name: focal-yoga_ceph-rbd-mirror + parent: bionic-stein + dependencies: *smoke-jobs +- job: + name: hirsute-wallaby_ceph-rbd-mirror + parent: bionic-stein + dependencies: *smoke-jobs +- job: + name: impish-xena_ceph-rbd-mirror + parent: bionic-stein + dependencies: *smoke-jobs +- job: + name: jammy-yoga_ceph-rbd-mirror + parent: bionic-stein + dependencies: *smoke-jobs diff --git a/pip.sh b/pip.sh new file mode 100755 index 0000000..9a7e6b0 --- /dev/null +++ b/pip.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# This file is managed centrally by release-tools and should not be modified +# within individual charm repos. See the 'global' dir contents for available +# choices of tox.ini for OpenStack Charms: +# https://github.com/openstack-charmers/release-tools +# +# setuptools 58.0 dropped the support for use_2to3=true which is needed to +# install blessings (an indirect dependency of charm-tools). +# +# More details on the beahvior of tox and virtualenv creation can be found at +# https://github.com/tox-dev/tox/issues/448 +# +# This script is wrapper to force the use of the pinned versions early in the +# process when the virtualenv was created and upgraded before installing the +# depedencies declared in the target. +pip install 'pip<20.3' 'setuptools<50.0.0' +pip "$@" diff --git a/requirements.txt b/requirements.txt index b786b42..a68620f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 # Build requirements +cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. charm-tools==2.8.3 simplejson diff --git a/src/metadata.yaml b/src/metadata.yaml index 4868079..f141caf 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -15,7 +15,6 @@ tags: - file-servers - misc series: -- xenial - bionic - focal - groovy diff --git a/src/tests/bundles/xenial-pike.yaml b/src/tests/bundles/focal-xena.yaml similarity index 57% rename from src/tests/bundles/xenial-pike.yaml rename to src/tests/bundles/focal-xena.yaml index 71c45d1..345cc60 100644 --- a/src/tests/bundles/xenial-pike.yaml +++ b/src/tests/bundles/focal-xena.yaml @@ -1,111 +1,164 @@ -series: xenial +variables: + openstack-origin: &openstack-origin cloud:focal-xena + +series: &series focal + +machines: + '0': + constraints: "mem=3072M" + '1': + constraints: "mem=3072M" + '2': + constraints: "mem=3072M" + applications: - mysql: - charm: cs:~openstack-charmers-next/percona-cluster - num_units: 1 + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + glance-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + cinder-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: cloud:xenial-pike + source: *openstack-origin + to: + - '0' + - '1' + - '2' + keystone: charm: cs:~openstack-charmers-next/keystone num_units: 1 options: - openstack-origin: cloud:xenial-pike + openstack-origin: *openstack-origin + rabbitmq-server: charm: cs:~openstack-charmers-next/rabbitmq-server num_units: 1 options: - source: cloud:xenial-pike + source: *openstack-origin + cinder: charm: cs:~openstack-charmers-next/cinder num_units: 1 options: block-device: None glance-api-version: 2 - openstack-origin: cloud:xenial-pike + openstack-origin: *openstack-origin + cinder-ceph: charm: cs:~openstack-charmers-next/cinder-ceph num_units: 0 + glance: charm: cs:~openstack-charmers-next/glance num_units: 1 options: - openstack-origin: cloud:xenial-pike + openstack-origin: *openstack-origin + nova-compute: charm: cs:~openstack-charmers-next/nova-compute num_units: 1 options: - openstack-origin: cloud:xenial-pike + openstack-origin: *openstack-origin + ceph-mon: charm: cs:~openstack-charmers-next/ceph-mon num_units: 3 options: expected-osd-count: 3 - source: cloud:xenial-pike + source: *openstack-origin + ceph-osd: charm: cs:~openstack-charmers-next/ceph-osd num_units: 3 options: - source: cloud:xenial-pike + source: *openstack-origin bluestore: False use-direct-io: False osd-devices: /opt + ceph-rbd-mirror: - series: xenial + series: *series charm: ../../../ceph-rbd-mirror num_units: 1 options: - source: cloud:xenial-pike + source: *openstack-origin + ceph-mon-b: charm: cs:~openstack-charmers-next/ceph-mon num_units: 3 options: expected-osd-count: 3 - source: cloud:xenial-pike + source: *openstack-origin + ceph-osd-b: charm: cs:~openstack-charmers-next/ceph-osd num_units: 3 options: - source: cloud:xenial-pike + source: *openstack-origin bluestore: False use-direct-io: False osd-devices: /opt + ceph-rbd-mirror-b: - series: xenial + series: *series charm: ../../../ceph-rbd-mirror num_units: 1 options: - source: cloud:xenial-pike + source: *openstack-origin + relations: -- - mysql - - keystone -- - mysql - - cinder -- - mysql - - glance + +- - 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 - cinder - - keystone - 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 diff --git a/src/tests/bundles/xenial-queens.yaml b/src/tests/bundles/focal-yoga.yaml similarity index 57% rename from src/tests/bundles/xenial-queens.yaml rename to src/tests/bundles/focal-yoga.yaml index 47a34ac..5d2a4ed 100644 --- a/src/tests/bundles/xenial-queens.yaml +++ b/src/tests/bundles/focal-yoga.yaml @@ -1,111 +1,164 @@ -series: xenial +variables: + openstack-origin: &openstack-origin cloud:focal-yoga + +series: &series focal + +machines: + '0': + constraints: "mem=3072M" + '1': + constraints: "mem=3072M" + '2': + constraints: "mem=3072M" + applications: - mysql: - charm: cs:~openstack-charmers-next/percona-cluster - num_units: 1 + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + glance-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + cinder-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: cloud:xenial-queens + source: *openstack-origin + to: + - '0' + - '1' + - '2' + keystone: charm: cs:~openstack-charmers-next/keystone num_units: 1 options: - openstack-origin: cloud:xenial-queens + openstack-origin: *openstack-origin + rabbitmq-server: charm: cs:~openstack-charmers-next/rabbitmq-server num_units: 1 options: - source: cloud:xenial-queens + source: *openstack-origin + cinder: charm: cs:~openstack-charmers-next/cinder num_units: 1 options: block-device: None glance-api-version: 2 - openstack-origin: cloud:xenial-queens + openstack-origin: *openstack-origin + cinder-ceph: charm: cs:~openstack-charmers-next/cinder-ceph num_units: 0 + glance: charm: cs:~openstack-charmers-next/glance num_units: 1 options: - openstack-origin: cloud:xenial-queens + openstack-origin: *openstack-origin + nova-compute: charm: cs:~openstack-charmers-next/nova-compute num_units: 1 options: - openstack-origin: cloud:xenial-queens + openstack-origin: *openstack-origin + ceph-mon: charm: cs:~openstack-charmers-next/ceph-mon num_units: 3 options: expected-osd-count: 3 - source: cloud:xenial-queens + source: *openstack-origin + ceph-osd: charm: cs:~openstack-charmers-next/ceph-osd num_units: 3 options: - source: cloud:xenial-queens + source: *openstack-origin bluestore: False use-direct-io: False osd-devices: /opt + ceph-rbd-mirror: - series: xenial + series: *series charm: ../../../ceph-rbd-mirror num_units: 1 options: - source: cloud:xenial-queens + source: *openstack-origin + ceph-mon-b: charm: cs:~openstack-charmers-next/ceph-mon num_units: 3 options: expected-osd-count: 3 - source: cloud:xenial-queens + source: *openstack-origin + ceph-osd-b: charm: cs:~openstack-charmers-next/ceph-osd num_units: 3 options: - source: cloud:xenial-queens + source: *openstack-origin bluestore: False use-direct-io: False osd-devices: /opt + ceph-rbd-mirror-b: - series: xenial + series: *series charm: ../../../ceph-rbd-mirror num_units: 1 options: - source: cloud:xenial-queens + source: *openstack-origin + relations: -- - mysql - - keystone -- - mysql - - cinder -- - mysql - - glance + +- - 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 - cinder - - keystone - 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 diff --git a/src/tests/bundles/groovy-victoria.yaml b/src/tests/bundles/impish-xena.yaml similarity index 98% rename from src/tests/bundles/groovy-victoria.yaml rename to src/tests/bundles/impish-xena.yaml index 8c1453a..40aa146 100644 --- a/src/tests/bundles/groovy-victoria.yaml +++ b/src/tests/bundles/impish-xena.yaml @@ -1,7 +1,7 @@ variables: openstack-origin: &openstack-origin distro -series: &series groovy +series: &series impish machines: '0': @@ -48,7 +48,6 @@ applications: options: block-device: None glance-api-version: 2 - openstack-origin: *openstack-origin cinder-ceph: charm: cs:~openstack-charmers-next/cinder-ceph diff --git a/src/tests/bundles/groovy-victoria-image-mirroring.yaml b/src/tests/bundles/jammy-yoga.yaml similarity index 95% rename from src/tests/bundles/groovy-victoria-image-mirroring.yaml rename to src/tests/bundles/jammy-yoga.yaml index 90ad5b0..17507a0 100644 --- a/src/tests/bundles/groovy-victoria-image-mirroring.yaml +++ b/src/tests/bundles/jammy-yoga.yaml @@ -1,7 +1,7 @@ variables: openstack-origin: &openstack-origin distro -series: &series groovy +series: &series jammy machines: '0': @@ -48,13 +48,10 @@ applications: options: block-device: None glance-api-version: 2 - openstack-origin: *openstack-origin cinder-ceph: charm: cs:~openstack-charmers-next/cinder-ceph num_units: 0 - options: - rbd-mirroring-mode: image glance: charm: cs:~openstack-charmers-next/glance @@ -143,8 +140,6 @@ relations: - cinder-ceph - - cinder-ceph:ceph - ceph-mon:client -- - cinder-ceph:ceph-replication-device - - ceph-mon-b:client - - nova-compute:ceph-access - cinder-ceph:ceph-access diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index bb6fa20..bd170e7 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -1,33 +1,37 @@ charm_name: ceph-rbd-mirror smoke_bundles: -- bionic-train +- focal-ussuri gate_bundles: -- bionic-train -- bionic-train-image-mirroring -- bionic-stein - bionic-queens +- bionic-queens-e2e +- bionic-queens-e2e-lxd +- bionic-stein +- bionic-ussuri +- focal-ussuri +- focal-ussuri-image-mirroring +- focal-victoria +- focal-victoria-image-mirroring +- focal-wallaby +- focal-wallaby-image-mirroring +- focal-xena +- focal-xena-image-mirroring +- hirsute-wallaby +- hirsute-wallaby-image-mirroring +- impish-xena +- impish-xena-image-mirroring comment: | The e2e bundles are useful for development but adds no additional value to the functional tests. dev_bundles: -- hirsute-wallaby -- hirsute-wallaby-image-mirroring -- groovy-victoria -- groovy-victoria-image-mirroring -- focal-wallaby -- focal-wallaby-image-mirroring -- focal-victoria -- focal-victoria-image-mirroring -- bionic-queens-e2e -- bionic-queens-e2e-lxd - bionic-rocky -- bionic-ussuri +- bionic-train +- bionic-train-image-mirroring # This is a dev bundle because we hit https://bugs.launchpad.net/charm-ceph-rbd-mirror/+bug/1892201. - bionic-ussuri-image-mirroring -- focal-ussuri -- focal-ussuri-image-mirroring -- xenial-queens -- xenial-pike +- focal-yoga +- focal-yoga-image-mirroring +- jammy-yoga +- jammy-yoga-image-mirroring configure: - zaza.openstack.charm_tests.glance.setup.add_lts_image tests: @@ -37,3 +41,8 @@ tests: tests_options: force_deploy: - hirsute-wallaby + - hirsute-wallaby-image-mirroring + - impish-xena + - impish-xena-image-mirroring + - jammy-yoga + - jammy-yoga-image-mirroring diff --git a/src/tox.ini b/src/tox.ini index e763047..b40d295 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -22,12 +22,12 @@ skip_missing_interpreters = False requires = pip < 20.3 virtualenv < 20.0 # NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci -minversion = 3.2.0 +minversion = 3.18.0 [testenv] setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 -whitelist_externals = juju +allowlist_externals = juju passenv = HOME TERM CS_* OS_* TEST_* deps = -r{toxinidir}/test-requirements.txt install_command = diff --git a/test-requirements.txt b/test-requirements.txt index af069e1..bb1307f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,6 +3,8 @@ # choices of *requirements.txt files for OpenStack Charms: # 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 diff --git a/tox.ini b/tox.ini index 5c81801..22159df 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,21 @@ envlist = pep8,py3 sitepackages = False # NOTE: Avoid false positives by not skipping missing interpreters. skip_missing_interpreters = False +# NOTES: +# * We avoid the new dependency resolver by pinning pip < 20.3, see +# https://github.com/pypa/pip/issues/9187 +# * Pinning dependencies requires tox >= 3.2.0, see +# https://tox.readthedocs.io/en/latest/config.html#conf-requires +# * It is also necessary to pin virtualenv as a newer virtualenv would still +# lead to fetching the latest pip in the func* tox targets, see +# https://stackoverflow.com/a/38133283 +requires = + pip < 20.3 + virtualenv < 20.0 + setuptools<50.0.0 + +# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci +minversion = 3.18.0 [testenv] setenv = VIRTUAL_ENV={envdir} @@ -21,7 +36,7 @@ setenv = VIRTUAL_ENV={envdir} JUJU_REPOSITORY={toxinidir}/build passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY install_command = - pip install {opts} {packages} + {toxinidir}/pip.sh install {opts} {packages} deps = -r{toxinidir}/requirements.txt