From 7f8c15924991b33e12ee159e0d1458b6ceb95908 Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Mon, 27 Sep 2021 15:32:49 +0100 Subject: [PATCH] Add xena bundles - add non-voting focal-xena bundle - add non-voting impish-xena bundle - rebuild to pick up charm-helpers changes - update tox/pip.sh to ensure setuptools<50.0.0 Change-Id: I65e364b76039cf7ffa496e1c7070d811ee592eb0 --- osci.yaml | 18 ++- pip.sh | 18 +++ rebuild | 2 +- src/tests/bundles/focal-xena-functional.yaml | 113 ++++++++++++++++++ src/tests/bundles/impish-xena-functional.yaml | 113 ++++++++++++++++++ src/tests/tests.yaml | 5 +- src/tox.ini | 4 +- tox.ini | 17 ++- 8 files changed, 284 insertions(+), 6 deletions(-) create mode 100755 pip.sh create mode 100644 src/tests/bundles/focal-xena-functional.yaml create mode 100644 src/tests/bundles/impish-xena-functional.yaml diff --git a/osci.yaml b/osci.yaml index 59a3a58..0a87d81 100644 --- a/osci.yaml +++ b/osci.yaml @@ -3,8 +3,12 @@ - charm-unit-jobs check: jobs: + - impish-xena-functional: + voting: false - hirsute-wallaby-functional - groovy-victoria-functional + - focal-xena-functional: + voting: false - focal-wallaby-functional - focal-victoria-functional - focal-ussuri-functional @@ -18,10 +22,16 @@ - job: - name: hirsute-wallaby-functional + name: impish-xena-functional parent: func-target dependencies: &smoke-jobs - bionic-ussuri-functional + vars: + tox_extra_args: impish-xena-functional +- job: + name: hirsute-wallaby-functional + parent: func-target + dependencies: *smoke-jobs vars: tox_extra_args: hirsute-wallaby-functional - job: @@ -30,6 +40,12 @@ dependencies: *smoke-jobs vars: tox_extra_args: groovy-victoria-functional +- job: + name: focal-xena-functional + parent: func-target + dependencies: *smoke-jobs + vars: + tox_extra_args: focal-xena-functional - job: name: focal-wallaby-functional parent: func-target 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/rebuild b/rebuild index 6a12738..321e686 100644 --- a/rebuild +++ b/rebuild @@ -2,4 +2,4 @@ # when dependencies of the charm change, # but nothing in the charm needs to. # simply change the uuid to something new -fa2caf60-b3eb-11eb-9eba-373a58f25e07 +53ded1b6-1178-11ec-83dc-130c2757962d diff --git a/src/tests/bundles/focal-xena-functional.yaml b/src/tests/bundles/focal-xena-functional.yaml new file mode 100644 index 0000000..7e9f2dc --- /dev/null +++ b/src/tests/bundles/focal-xena-functional.yaml @@ -0,0 +1,113 @@ +variables: + openstack-origin: &openstack-origin cloud:focal-xena + +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': + # for quagga which has no focal support yet + series: bionic + +applications: + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + neutron-api-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: *openstack-origin + to: + - '0' + - '1' + - '2' + + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *openstack-origin + haproxy-server-timeout: 90000 + haproxy-client-timeout: 90000 + haproxy-queue-timeout: 9000 + haproxy-connect-timeout: 9000 + to: + - '3' + + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + options: + manage-neutron-plugin-legacy-mode: true + neutron-plugin: ovs + flat-network-providers: physnet1, + neutron-security-groups: true + openstack-origin: *openstack-origin + haproxy-server-timeout: 90000 + haproxy-client-timeout: 90000 + haproxy-queue-timeout: 9000 + haproxy-connect-timeout: 9000 + to: + - '4' + + neutron-dynamic-routing: + charm: ../../../neutron-dynamic-routing + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '5' + + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + to: + - '6' + + quagga: + charm: cs:~openstack-charmers-next/bionic/quagga + series: bionic + num_units: 1 + to: + - '7' + +relations: + + - - 'neutron-dynamic-routing:amqp' + - 'rabbitmq-server:amqp' + + - - 'neutron-dynamic-routing:bgp-speaker' + - 'quagga:bgpclient' + + - - 'keystone:shared-db' + - 'keystone-mysql-router:shared-db' + - - 'keystone-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'neutron-api:shared-db' + - 'neutron-api-mysql-router:shared-db' + - - 'neutron-api-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' + + - - 'neutron-api:identity-service' + - 'keystone:identity-service' diff --git a/src/tests/bundles/impish-xena-functional.yaml b/src/tests/bundles/impish-xena-functional.yaml new file mode 100644 index 0000000..7ade3bd --- /dev/null +++ b/src/tests/bundles/impish-xena-functional.yaml @@ -0,0 +1,113 @@ +variables: + openstack-origin: &openstack-origin distro + +series: impish + +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': + # for quagga which has no focal/groovy/hirsute support yet + series: bionic + +applications: + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + neutron-api-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: *openstack-origin + to: + - '0' + - '1' + - '2' + + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *openstack-origin + haproxy-server-timeout: 90000 + haproxy-client-timeout: 90000 + haproxy-queue-timeout: 9000 + haproxy-connect-timeout: 9000 + to: + - '3' + + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + options: + manage-neutron-plugin-legacy-mode: true + neutron-plugin: ovs + flat-network-providers: physnet1, + neutron-security-groups: true + openstack-origin: *openstack-origin + haproxy-server-timeout: 90000 + haproxy-client-timeout: 90000 + haproxy-queue-timeout: 9000 + haproxy-connect-timeout: 9000 + to: + - '4' + + neutron-dynamic-routing: + charm: ../../../neutron-dynamic-routing + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '5' + + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + to: + - '6' + + quagga: + charm: cs:~openstack-charmers-next/bionic/quagga + series: bionic + num_units: 1 + to: + - '7' + +relations: + + - - 'neutron-dynamic-routing:amqp' + - 'rabbitmq-server:amqp' + + - - 'neutron-dynamic-routing:bgp-speaker' + - 'quagga:bgpclient' + + - - 'keystone:shared-db' + - 'keystone-mysql-router:shared-db' + - - 'keystone-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'neutron-api:shared-db' + - 'neutron-api-mysql-router:shared-db' + - - 'neutron-api-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' + + - - 'neutron-api:identity-service' + - 'keystone:identity-service' diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index 6a6182c..7e7e936 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -20,11 +20,14 @@ dev_bundles: - xenial-pike-functional - xenial-queens-functional - bionic-rocky-functional +- focal-xena-functional - hirsute-wallaby-functional +- impish-xena-functional tests: - zaza.openstack.charm_tests.dragent.tests.DRAgentTest tests_options: force_deploy: - - hirsute-wallaby-functional + - groovy-victoria-functional + - impish-xena-functional 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/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