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/bindep.txt b/bindep.txt new file mode 100644 index 0000000..bdbe8d5 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,3 @@ +libffi-dev [platform:dpkg] +libxml2-dev [platform:dpkg] +libxslt1-dev [platform:dpkg] diff --git a/charmcraft.yaml b/charmcraft.yaml index 4dfa986..fbd9c9c 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -22,13 +22,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] diff --git a/charmhelpers/contrib/network/ip.py b/charmhelpers/contrib/network/ip.py index de56584..f8edf37 100644 --- a/charmhelpers/contrib/network/ip.py +++ b/charmhelpers/contrib/network/ip.py @@ -467,7 +467,7 @@ def ns_query(address): try: answers = dns.resolver.query(address, rtype) - except dns.resolver.NXDOMAIN: + except (dns.resolver.NXDOMAIN, dns.resolver.NoNameservers): return None if answers: diff --git a/charmhelpers/contrib/openstack/context.py b/charmhelpers/contrib/openstack/context.py index 32c69ff..970a657 100644 --- a/charmhelpers/contrib/openstack/context.py +++ b/charmhelpers/contrib/openstack/context.py @@ -2560,14 +2560,18 @@ class OVSDPDKDeviceContext(OSContextGenerator): :rtype: List[int] """ cores = [] - ranges = cpulist.split(',') - for cpu_range in ranges: - if "-" in cpu_range: - cpu_min_max = cpu_range.split('-') - cores += range(int(cpu_min_max[0]), - int(cpu_min_max[1]) + 1) - else: - cores.append(int(cpu_range)) + if cpulist and re.match(r"^[0-9,\-^]*$", cpulist): + ranges = cpulist.split(',') + for cpu_range in ranges: + if "-" in cpu_range: + cpu_min_max = cpu_range.split('-') + cores += range(int(cpu_min_max[0]), + int(cpu_min_max[1]) + 1) + elif "^" in cpu_range: + cpu_rm = cpu_range.split('^') + cores.remove(int(cpu_rm[1])) + else: + cores.append(int(cpu_range)) return cores def _numa_node_cores(self): @@ -2586,36 +2590,32 @@ class OVSDPDKDeviceContext(OSContextGenerator): def cpu_mask(self): """Get hex formatted CPU mask - The mask is based on using the first config:dpdk-socket-cores cores of each NUMA node in the unit. :returns: hex formatted CPU mask :rtype: str """ - return self.cpu_masks()['dpdk_lcore_mask'] - - def cpu_masks(self): - """Get hex formatted CPU masks - - The mask is based on using the first config:dpdk-socket-cores - cores of each NUMA node in the unit, followed by the - next config:pmd-socket-cores - - :returns: Dict of hex formatted CPU masks - :rtype: Dict[str, str] - """ - num_lcores = config('dpdk-socket-cores') - pmd_cores = config('pmd-socket-cores') - lcore_mask = 0 - pmd_mask = 0 + num_cores = config('dpdk-socket-cores') + mask = 0 for cores in self._numa_node_cores().values(): - for core in cores[:num_lcores]: - lcore_mask = lcore_mask | 1 << core - for core in cores[num_lcores:][:pmd_cores]: - pmd_mask = pmd_mask | 1 << core - return { - 'pmd_cpu_mask': format(pmd_mask, '#04x'), - 'dpdk_lcore_mask': format(lcore_mask, '#04x')} + for core in cores[:num_cores]: + mask = mask | 1 << core + return format(mask, '#04x') + + @classmethod + def pmd_cpu_mask(cls): + """Get hex formatted pmd CPU mask + + The mask is based on config:pmd-cpu-set. + :returns: hex formatted CPU mask + :rtype: str + """ + mask = 0 + cpu_list = cls._parse_cpu_list(config('pmd-cpu-set')) + if cpu_list: + for core in cpu_list: + mask = mask | 1 << core + return format(mask, '#x') def socket_memory(self): """Formatted list of socket memory configuration per socket. @@ -2694,6 +2694,7 @@ class OVSDPDKDeviceContext(OSContextGenerator): ctxt['device_whitelist'] = self.device_whitelist() ctxt['socket_memory'] = self.socket_memory() ctxt['cpu_mask'] = self.cpu_mask() + ctxt['pmd_cpu_mask'] = self.pmd_cpu_mask() return ctxt diff --git a/charmhelpers/contrib/openstack/utils.py b/charmhelpers/contrib/openstack/utils.py index c8747c1..1fa2814 100644 --- a/charmhelpers/contrib/openstack/utils.py +++ b/charmhelpers/contrib/openstack/utils.py @@ -158,6 +158,7 @@ OPENSTACK_CODENAMES = OrderedDict([ ('2021.1', 'wallaby'), ('2021.2', 'xena'), ('2022.1', 'yoga'), + ('2022.2', 'zed'), ]) # The ugly duckling - must list releases oldest to newest @@ -400,13 +401,16 @@ def get_os_codename_version(vers): error_out(e) -def get_os_version_codename(codename, version_map=OPENSTACK_CODENAMES): +def get_os_version_codename(codename, version_map=OPENSTACK_CODENAMES, + raise_exception=False): '''Determine OpenStack version number from codename.''' for k, v in version_map.items(): if v == codename: return k e = 'Could not derive OpenStack version for '\ 'codename: %s' % codename + if raise_exception: + raise ValueError(str(e)) error_out(e) diff --git a/charmhelpers/core/host.py b/charmhelpers/core/host.py index ad2cab4..ef6c8ec 100644 --- a/charmhelpers/core/host.py +++ b/charmhelpers/core/host.py @@ -277,7 +277,7 @@ def service_resume(service_name, init_dir="/etc/init", return started -def service(action, service_name, **kwargs): +def service(action, service_name=None, **kwargs): """Control a system service. :param action: the action to take on the service @@ -286,7 +286,9 @@ def service(action, service_name, **kwargs): the form of key=value. """ if init_is_systemd(service_name=service_name): - cmd = ['systemctl', action, service_name] + cmd = ['systemctl', action] + if service_name is not None: + cmd.append(service_name) else: cmd = ['service', service_name, action] for key, value in kwargs.items(): diff --git a/charmhelpers/core/host_factory/ubuntu.py b/charmhelpers/core/host_factory/ubuntu.py index 0906c5c..cc2d89f 100644 --- a/charmhelpers/core/host_factory/ubuntu.py +++ b/charmhelpers/core/host_factory/ubuntu.py @@ -30,6 +30,7 @@ UBUNTU_RELEASES = ( 'hirsute', 'impish', 'jammy', + 'kinetic', ) diff --git a/charmhelpers/core/services/base.py b/charmhelpers/core/services/base.py index 7c37c65..8d217b5 100644 --- a/charmhelpers/core/services/base.py +++ b/charmhelpers/core/services/base.py @@ -15,7 +15,8 @@ import os import json import inspect -from collections import Iterable, OrderedDict +from collections import OrderedDict +from collections.abc import Iterable from charmhelpers.core import host from charmhelpers.core import hookenv diff --git a/charmhelpers/fetch/archiveurl.py b/charmhelpers/fetch/archiveurl.py index 2cb2e88..0e35c90 100644 --- a/charmhelpers/fetch/archiveurl.py +++ b/charmhelpers/fetch/archiveurl.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import contextlib import os import hashlib import re @@ -24,11 +25,15 @@ from charmhelpers.payload.archive import ( get_archive_handler, extract, ) +from charmhelpers.core.hookenv import ( + env_proxy_settings, +) from charmhelpers.core.host import mkdir, check_hash from urllib.request import ( build_opener, install_opener, urlopen, urlretrieve, HTTPPasswordMgrWithDefaultRealm, HTTPBasicAuthHandler, + ProxyHandler ) from urllib.parse import urlparse, urlunparse, parse_qs from urllib.error import URLError @@ -50,6 +55,20 @@ def splitpasswd(user): return user, None +@contextlib.contextmanager +def proxy_env(): + """ + Creates a context which temporarily modifies the proxy settings in os.environ. + """ + restore = {**os.environ} # Copy the current os.environ + juju_proxies = env_proxy_settings() or {} + os.environ.update(**juju_proxies) # Insert or Update the os.environ + yield os.environ + for key in juju_proxies: + del os.environ[key] # remove any keys which were added or updated + os.environ.update(**restore) # restore any original values + + class ArchiveUrlFetchHandler(BaseFetchHandler): """ Handler to download archive files from arbitrary URLs. @@ -80,6 +99,7 @@ class ArchiveUrlFetchHandler(BaseFetchHandler): # propagate all exceptions # URLError, OSError, etc proto, netloc, path, params, query, fragment = urlparse(source) + handlers = [] if proto in ('http', 'https'): auth, barehost = splituser(netloc) if auth is not None: @@ -89,10 +109,13 @@ class ArchiveUrlFetchHandler(BaseFetchHandler): # Realm is set to None in add_password to force the username and password # to be used whatever the realm passman.add_password(None, source, username, password) - authhandler = HTTPBasicAuthHandler(passman) - opener = build_opener(authhandler) - install_opener(opener) - response = urlopen(source) + handlers.append(HTTPBasicAuthHandler(passman)) + + with proxy_env(): + handlers.append(ProxyHandler()) + opener = build_opener(*handlers) + install_opener(opener) + response = urlopen(source) try: with open(dest, 'wb') as dest_file: dest_file.write(response.read()) diff --git a/charmhelpers/fetch/ubuntu.py b/charmhelpers/fetch/ubuntu.py index e6f8a0a..93b9276 100644 --- a/charmhelpers/fetch/ubuntu.py +++ b/charmhelpers/fetch/ubuntu.py @@ -222,6 +222,14 @@ CLOUD_ARCHIVE_POCKETS = { 'yoga/proposed': 'focal-proposed/yoga', 'focal-yoga/proposed': 'focal-proposed/yoga', 'focal-proposed/yoga': 'focal-proposed/yoga', + # Zed + 'zed': 'jammy-updates/zed', + 'jammy-zed': 'jammy-updates/zed', + 'jammy-zed/updates': 'jammy-updates/zed', + 'jammy-updates/zed': 'jammy-updates/zed', + 'zed/proposed': 'jammy-proposed/zed', + 'jammy-zed/proposed': 'jammy-proposed/zed', + 'jammy-proposed/zed': 'jammy-proposed/zed', } @@ -248,6 +256,7 @@ OPENSTACK_RELEASES = ( 'wallaby', 'xena', 'yoga', + 'zed', ) @@ -274,6 +283,7 @@ UBUNTU_OPENSTACK_RELEASE = OrderedDict([ ('hirsute', 'wallaby'), ('impish', 'xena'), ('jammy', 'yoga'), + ('kinetic', 'zed'), ]) diff --git a/metadata.yaml b/metadata.yaml index e6e5ba0..2698433 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -11,7 +11,6 @@ tags: - file-servers - misc series: -- focal - jammy subordinate: true provides: diff --git a/osci.yaml b/osci.yaml index 2026585..d537a3e 100644 --- a/osci.yaml +++ b/osci.yaml @@ -1,52 +1,41 @@ - project: templates: - - charm-unit-jobs-py38 - charm-unit-jobs-py310 - - charm-xena-functional-jobs - - charm-yoga-functional-jobs + - charm-zed-functional-jobs check: jobs: - - focal-xena-ec_cinder-ceph - - focal-yoga-ec_cinder-ceph: + - jammy-yoga-ec_cinder-ceph + - jammy-zed-ec_cinder-ceph: voting: false - - impish-xena-ec_cinder-ceph: - voting: false - - jammy-yoga-ec_cinder-ceph: + - kinetic-zed-ec_cinder-ceph: voting: false vars: needs_charm_build: true charm_build_name: cinder-ceph build_type: charmcraft + charmcraft_channel: 2.0/stable -- job: - name: focal-xena-ec_cinder-ceph - parent: func-target - dependencies: - - charm-build - - osci-lint - - tox-py38 - - name: tox-py310 - soft: true - vars: - tox_extra_args: focal-xena-ec -- job: - name: focal-yoga-ec_cinder-ceph - parent: func-target - dependencies: - - focal-xena-ec_cinder-ceph - vars: - tox_extra_args: focal-yoga-ec -- job: - name: impish-xena-ec_cinder-ceph - parent: func-target - dependencies: - - focal-xena-ec_cinder-ceph - vars: - tox_extra_args: impish-xena-ec - job: name: jammy-yoga-ec_cinder-ceph parent: func-target dependencies: - - focal-xena-ec_cinder-ceph + - charm-build + - osci-lint + - name: tox-py310 + soft: true vars: tox_extra_args: jammy-yoga-ec +- job: + name: jammy-zed-ec_cinder-ceph + parent: func-target + dependencies: + - jammy-yoga-ec_cinder-ceph + vars: + tox_extra_args: jammy-zed-ec +- job: + name: kinetic-zed-ec_cinder-ceph + parent: func-target + dependencies: + - jammy-yoga-ec_cinder-ceph + vars: + tox_extra_args: kinetic-zed-ec diff --git a/requirements.txt b/requirements.txt index 196ff38..3b1cb7b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,9 +11,6 @@ pbr==5.6.0 simplejson>=2.2.0 netifaces>=0.10.4 -# Build requirements -cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. - # NOTE: newer versions of cryptography require a Rust compiler to build, # see # * https://github.com/openstack-charmers/zaza/issues/421 @@ -27,8 +24,6 @@ netaddr>0.7.16,<0.8.0 Jinja2>=2.6 # BSD License (3 clause) six>=1.9.0 -# dnspython 2.0.0 dropped py3.5 support -dnspython<2.0.0; python_version < '3.6' -dnspython; python_version >= '3.6' +dnspython psutil>=1.1.1,<2.0.0 diff --git a/test-requirements.txt b/test-requirements.txt index 0aabe17..4ef87dc 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,7 +8,6 @@ # all of its own requirements and if it doesn't, fix it there. # 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 requests>=2.18.4 @@ -19,25 +18,12 @@ 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' - coverage>=4.5.2 pyudev # for ceph-* charm unit tests (need to fix the ceph-* charm unit tests/mocking) git+https://github.com/openstack-charmers/zaza.git#egg=zaza git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack # Needed for charm-glance: -git+https://opendev.org/openstack/tempest.git#egg=tempest;python_version>='3.6' -tempest<24.0.0;python_version<'3.6' +git+https://opendev.org/openstack/tempest.git#egg=tempest croniter # needed for charm-rabbitmq-server unit tests diff --git a/tests/bundles/focal-yoga-ec.yaml b/tests/bundles/focal-yoga-ec.yaml deleted file mode 100644 index 99f914f..0000000 --- a/tests/bundles/focal-yoga-ec.yaml +++ /dev/null @@ -1,303 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-yoga - -series: &series focal - -machines: - 0: - 1: - 2: - 3: - 4: - 5: - 6: - 7: - 8: - 9: - 10: - 11: - 12: - 13: - 14: - 15: - 16: - # for the nova-compute unit - 17: - constraints: mem=4G cores=4 root-disk=20G - 18: - 19: - 20: - -applications: - - nova-cloud-controller-mysql-router: - charm: ch:mysql-router - channel: latest/edge - placement-mysql-router: - charm: ch:mysql-router - channel: latest/edge - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - glance-mysql-router: - charm: ch:mysql-router - channel: latest/edge - neutron-api-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 - - ceph-osd: - charm: ch:ceph-osd - num_units: 6 - storage: - osd-devices: '10G' - options: - osd-devices: '/dev/test-non-existent' - source: *openstack-origin - to: - - '3' - - '4' - - '5' - - '18' - - '19' - - '20' - channel: quincy/edge - - ceph-mon: - charm: ch:ceph-mon - num_units: 3 - options: - monitor-count: '3' - source: *openstack-origin - to: - - '6' - - '7' - - '8' - channel: quincy/edge - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '9' - channel: latest/edge - - nova-cloud-controller: - charm: ch:nova-cloud-controller - num_units: 1 - options: - openstack-origin: *openstack-origin - network-manager: Neutron - debug: true - to: - - '10' - channel: yoga/edge - - placement: - charm: ch:placement - num_units: 1 - constraints: mem=1G - options: - openstack-origin: *openstack-origin - to: - - '11' - channel: yoga/edge - - neutron-api: - charm: ch:neutron-api - num_units: 1 - options: - manage-neutron-plugin-legacy-mode: true - neutron-plugin: ovs - openstack-origin: *openstack-origin - flat-network-providers: physnet1 - neutron-security-groups: true - to: - - '12' - channel: yoga/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '13' - channel: yoga/edge - - neutron-gateway: - charm: ch:neutron-gateway - num_units: 1 - options: - openstack-origin: *openstack-origin - bridge-mappings: physnet1:br-ex - to: - - '14' - channel: yoga/edge - - glance: - charm: ch:glance - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '15' - channel: yoga/edge - - neutron-openvswitch: - charm: ch:neutron-openvswitch - channel: yoga/edge - - cinder: - charm: ch:cinder - num_units: 1 - options: - openstack-origin: *openstack-origin - block-device: None - glance-api-version: 2 - to: - - '16' - channel: yoga/edge - - cinder-ceph: - charm: ../../cinder-ceph.charm - options: - pool-type: erasure-coded - ec-profile-k: 4 - ec-profile-m: 2 - - nova-compute: - charm: ch:nova-compute - num_units: 1 - storage: - ephemeral-device: '40G' - options: - openstack-origin: *openstack-origin - config-flags: auto_assign_floating_ip=False - enable-live-migration: false - aa-profile-mode: enforce - debug: true - to: - - '17' - channel: yoga/edge - -relations: - - - - 'nova-compute:image-service' - - 'glance:image-service' - - - - 'nova-compute:amqp' - - 'rabbitmq-server:amqp' - - - - 'nova-cloud-controller:shared-db' - - 'nova-cloud-controller-mysql-router:shared-db' - - - 'nova-cloud-controller-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'nova-cloud-controller:identity-service' - - 'keystone:identity-service' - - - - 'nova-cloud-controller:amqp' - - 'rabbitmq-server:amqp' - - - - 'nova-cloud-controller:cloud-compute' - - 'nova-compute:cloud-compute' - - - - 'nova-cloud-controller:image-service' - - 'glance:image-service' - - - - 'placement:shared-db' - - 'placement-mysql-router:shared-db' - - - 'placement-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'placement:identity-service' - - 'keystone:identity-service' - - - - 'placement:placement' - - 'nova-cloud-controller:placement' - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:identity-service' - - 'keystone:identity-service' - - - - 'glance:shared-db' - - 'glance-mysql-router:shared-db' - - - 'glance-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:amqp' - - 'rabbitmq-server:amqp' - - - - 'glance:ceph' - - 'ceph-mon:client' - - - - 'neutron-gateway:amqp' - - 'rabbitmq-server:amqp' - - - - 'nova-cloud-controller:quantum-network-service' - - 'neutron-gateway:quantum-network-service' - - - - '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:neutron-api' - - 'nova-cloud-controller:neutron-api' - - - - 'neutron-api:identity-service' - - 'keystone:identity-service' - - - - 'nova-compute:neutron-plugin' - - 'neutron-openvswitch:neutron-plugin' - - - - 'rabbitmq-server:amqp' - - 'neutron-openvswitch:amqp' - - - - 'cinder:shared-db' - - 'cinder-mysql-router:shared-db' - - - 'cinder-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'cinder:identity-service' - - 'keystone:identity-service' - - - - 'cinder:amqp' - - 'rabbitmq-server:amqp' - - - - 'cinder:image-service' - - 'glance:image-service' - - - - 'cinder-ceph:storage-backend' - - 'cinder:storage-backend' - - - - 'nova-compute:ceph-access' - - 'cinder-ceph:ceph-access' - - - - 'ceph-mon:client' - - 'cinder-ceph:ceph' - - - - 'ceph-mon:osd' - - 'ceph-osd:mon' diff --git a/tests/bundles/focal-yoga.yaml b/tests/bundles/focal-yoga.yaml deleted file mode 100644 index 7508800..0000000 --- a/tests/bundles/focal-yoga.yaml +++ /dev/null @@ -1,293 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-yoga - -series: &series focal - -machines: - 0: - 1: - 2: - 3: - 4: - 5: - 6: - 7: - 8: - 9: - 10: - 11: - 12: - 13: - 14: - 15: - 16: - # for the nova-compute unit - 17: - constraints: mem=4G cores=4 root-disk=20G - -applications: - - nova-cloud-controller-mysql-router: - charm: ch:mysql-router - channel: latest/edge - placement-mysql-router: - charm: ch:mysql-router - channel: latest/edge - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - glance-mysql-router: - charm: ch:mysql-router - channel: latest/edge - neutron-api-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 - - ceph-osd: - charm: ch:ceph-osd - num_units: 3 - storage: - osd-devices: '10G' - options: - osd-devices: '/dev/test-non-existent' - source: *openstack-origin - to: - - '3' - - '4' - - '5' - channel: quincy/edge - - ceph-mon: - charm: ch:ceph-mon - num_units: 3 - options: - monitor-count: '3' - source: *openstack-origin - to: - - '6' - - '7' - - '8' - channel: quincy/edge - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '9' - channel: latest/edge - - nova-cloud-controller: - charm: ch:nova-cloud-controller - num_units: 1 - options: - openstack-origin: *openstack-origin - network-manager: Neutron - debug: true - to: - - '10' - channel: yoga/edge - - placement: - charm: ch:placement - num_units: 1 - constraints: mem=1G - options: - openstack-origin: *openstack-origin - to: - - '11' - channel: yoga/edge - - neutron-api: - charm: ch:neutron-api - num_units: 1 - options: - manage-neutron-plugin-legacy-mode: true - neutron-plugin: ovs - openstack-origin: *openstack-origin - flat-network-providers: physnet1 - neutron-security-groups: true - to: - - '12' - channel: yoga/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '13' - channel: yoga/edge - - neutron-gateway: - charm: ch:neutron-gateway - num_units: 1 - options: - openstack-origin: *openstack-origin - bridge-mappings: physnet1:br-ex - to: - - '14' - channel: yoga/edge - - glance: - charm: ch:glance - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '15' - channel: yoga/edge - - neutron-openvswitch: - charm: ch:neutron-openvswitch - channel: yoga/edge - - cinder: - charm: ch:cinder - num_units: 1 - options: - openstack-origin: *openstack-origin - block-device: None - glance-api-version: 2 - to: - - '16' - channel: yoga/edge - - cinder-ceph: - charm: ../../cinder-ceph.charm - - nova-compute: - charm: ch:nova-compute - num_units: 1 - storage: - ephemeral-device: '40G' - options: - openstack-origin: *openstack-origin - config-flags: auto_assign_floating_ip=False - enable-live-migration: false - aa-profile-mode: enforce - debug: true - to: - - '17' - channel: yoga/edge - -relations: - - - - 'nova-compute:image-service' - - 'glance:image-service' - - - - 'nova-compute:amqp' - - 'rabbitmq-server:amqp' - - - - 'nova-cloud-controller:shared-db' - - 'nova-cloud-controller-mysql-router:shared-db' - - - 'nova-cloud-controller-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'nova-cloud-controller:identity-service' - - 'keystone:identity-service' - - - - 'nova-cloud-controller:amqp' - - 'rabbitmq-server:amqp' - - - - 'nova-cloud-controller:cloud-compute' - - 'nova-compute:cloud-compute' - - - - 'nova-cloud-controller:image-service' - - 'glance:image-service' - - - - 'placement:shared-db' - - 'placement-mysql-router:shared-db' - - - 'placement-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'placement:identity-service' - - 'keystone:identity-service' - - - - 'placement:placement' - - 'nova-cloud-controller:placement' - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:identity-service' - - 'keystone:identity-service' - - - - 'glance:shared-db' - - 'glance-mysql-router:shared-db' - - - 'glance-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'glance:amqp' - - 'rabbitmq-server:amqp' - - - - 'glance:ceph' - - 'ceph-mon:client' - - - - 'neutron-gateway:amqp' - - 'rabbitmq-server:amqp' - - - - 'nova-cloud-controller:quantum-network-service' - - 'neutron-gateway:quantum-network-service' - - - - '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:neutron-api' - - 'nova-cloud-controller:neutron-api' - - - - 'neutron-api:identity-service' - - 'keystone:identity-service' - - - - 'nova-compute:neutron-plugin' - - 'neutron-openvswitch:neutron-plugin' - - - - 'rabbitmq-server:amqp' - - 'neutron-openvswitch:amqp' - - - - 'cinder:shared-db' - - 'cinder-mysql-router:shared-db' - - - 'cinder-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'cinder:identity-service' - - 'keystone:identity-service' - - - - 'cinder:amqp' - - 'rabbitmq-server:amqp' - - - - 'cinder:image-service' - - 'glance:image-service' - - - - 'cinder-ceph:storage-backend' - - 'cinder:storage-backend' - - - - 'nova-compute:ceph-access' - - 'cinder-ceph:ceph-access' - - - - 'ceph-mon:client' - - 'cinder-ceph:ceph' - - - - 'ceph-mon:osd' - - 'ceph-osd:mon' diff --git a/tests/bundles/jammy-yoga-ec.yaml b/tests/bundles/jammy-yoga-ec.yaml index d5d8dde..6fff176 100644 --- a/tests/bundles/jammy-yoga-ec.yaml +++ b/tests/bundles/jammy-yoga-ec.yaml @@ -75,7 +75,7 @@ applications: - '18' - '19' - '20' - channel: quincy/edge + channel: latest/edge ceph-mon: charm: ch:ceph-mon @@ -87,7 +87,7 @@ applications: - '6' - '7' - '8' - channel: quincy/edge + channel: latest/edge rabbitmq-server: charm: ch:rabbitmq-server @@ -105,7 +105,7 @@ applications: debug: true to: - '10' - channel: yoga/edge + channel: latest/edge placement: charm: ch:placement @@ -115,7 +115,7 @@ applications: openstack-origin: *openstack-origin to: - '11' - channel: yoga/edge + channel: latest/edge neutron-api: charm: ch:neutron-api @@ -128,7 +128,7 @@ applications: neutron-security-groups: true to: - '12' - channel: yoga/edge + channel: latest/edge keystone: charm: ch:keystone @@ -137,7 +137,7 @@ applications: openstack-origin: *openstack-origin to: - '13' - channel: yoga/edge + channel: latest/edge neutron-gateway: charm: ch:neutron-gateway @@ -147,7 +147,7 @@ applications: bridge-mappings: physnet1:br-ex to: - '14' - channel: yoga/edge + channel: latest/edge glance: charm: ch:glance @@ -156,11 +156,11 @@ applications: openstack-origin: *openstack-origin to: - '15' - channel: yoga/edge + channel: latest/edge neutron-openvswitch: charm: ch:neutron-openvswitch - channel: yoga/edge + channel: latest/edge cinder: charm: ch:cinder @@ -171,7 +171,7 @@ applications: glance-api-version: 2 to: - '16' - channel: yoga/edge + channel: latest/edge cinder-ceph: charm: ../../cinder-ceph.charm @@ -193,7 +193,7 @@ applications: debug: true to: - '17' - channel: yoga/edge + channel: latest/edge relations: diff --git a/tests/bundles/jammy-yoga.yaml b/tests/bundles/jammy-yoga.yaml index b39e2f1..f1b18c9 100644 --- a/tests/bundles/jammy-yoga.yaml +++ b/tests/bundles/jammy-yoga.yaml @@ -69,7 +69,7 @@ applications: - '3' - '4' - '5' - channel: quincy/edge + channel: latest/edge ceph-mon: charm: ch:ceph-mon @@ -81,7 +81,7 @@ applications: - '6' - '7' - '8' - channel: quincy/edge + channel: latest/edge rabbitmq-server: charm: ch:rabbitmq-server @@ -99,7 +99,7 @@ applications: debug: true to: - '10' - channel: yoga/edge + channel: latest/edge placement: charm: ch:placement @@ -109,7 +109,7 @@ applications: openstack-origin: *openstack-origin to: - '11' - channel: yoga/edge + channel: latest/edge neutron-api: charm: ch:neutron-api @@ -122,7 +122,7 @@ applications: neutron-security-groups: true to: - '12' - channel: yoga/edge + channel: latest/edge keystone: charm: ch:keystone @@ -131,7 +131,7 @@ applications: openstack-origin: *openstack-origin to: - '13' - channel: yoga/edge + channel: latest/edge neutron-gateway: charm: ch:neutron-gateway @@ -141,7 +141,7 @@ applications: bridge-mappings: physnet1:br-ex to: - '14' - channel: yoga/edge + channel: latest/edge glance: charm: ch:glance @@ -150,11 +150,11 @@ applications: openstack-origin: *openstack-origin to: - '15' - channel: yoga/edge + channel: latest/edge neutron-openvswitch: charm: ch:neutron-openvswitch - channel: yoga/edge + channel: latest/edge cinder: charm: ch:cinder @@ -165,7 +165,7 @@ applications: glance-api-version: 2 to: - '16' - channel: yoga/edge + channel: latest/edge cinder-ceph: charm: ../../cinder-ceph.charm @@ -183,7 +183,7 @@ applications: debug: true to: - '17' - channel: yoga/edge + channel: latest/edge relations: diff --git a/tests/bundles/focal-xena-ec.yaml b/tests/bundles/jammy-zed-ec.yaml similarity index 94% rename from tests/bundles/focal-xena-ec.yaml rename to tests/bundles/jammy-zed-ec.yaml index 42336c0..da2e882 100644 --- a/tests/bundles/focal-xena-ec.yaml +++ b/tests/bundles/jammy-zed-ec.yaml @@ -1,7 +1,7 @@ variables: - openstack-origin: &openstack-origin cloud:focal-xena + openstack-origin: &openstack-origin cloud:jammy-zed -series: &series focal +series: &series jammy machines: 0: @@ -75,7 +75,7 @@ applications: - '18' - '19' - '20' - channel: quincy/edge + channel: latest/edge ceph-mon: charm: ch:ceph-mon @@ -87,7 +87,7 @@ applications: - '6' - '7' - '8' - channel: quincy/edge + channel: latest/edge rabbitmq-server: charm: ch:rabbitmq-server @@ -105,7 +105,7 @@ applications: debug: true to: - '10' - channel: yoga/edge + channel: latest/edge placement: charm: ch:placement @@ -115,7 +115,7 @@ applications: openstack-origin: *openstack-origin to: - '11' - channel: yoga/edge + channel: latest/edge neutron-api: charm: ch:neutron-api @@ -128,7 +128,7 @@ applications: neutron-security-groups: true to: - '12' - channel: yoga/edge + channel: latest/edge keystone: charm: ch:keystone @@ -137,7 +137,7 @@ applications: openstack-origin: *openstack-origin to: - '13' - channel: yoga/edge + channel: latest/edge neutron-gateway: charm: ch:neutron-gateway @@ -147,7 +147,7 @@ applications: bridge-mappings: physnet1:br-ex to: - '14' - channel: yoga/edge + channel: latest/edge glance: charm: ch:glance @@ -156,11 +156,11 @@ applications: openstack-origin: *openstack-origin to: - '15' - channel: yoga/edge + channel: latest/edge neutron-openvswitch: charm: ch:neutron-openvswitch - channel: yoga/edge + channel: latest/edge cinder: charm: ch:cinder @@ -171,7 +171,7 @@ applications: glance-api-version: 2 to: - '16' - channel: yoga/edge + channel: latest/edge cinder-ceph: charm: ../../cinder-ceph.charm @@ -193,7 +193,7 @@ applications: debug: true to: - '17' - channel: yoga/edge + channel: latest/edge relations: diff --git a/tests/bundles/focal-xena.yaml b/tests/bundles/jammy-zed.yaml similarity index 94% rename from tests/bundles/focal-xena.yaml rename to tests/bundles/jammy-zed.yaml index 6962604..afe3a4f 100644 --- a/tests/bundles/focal-xena.yaml +++ b/tests/bundles/jammy-zed.yaml @@ -1,7 +1,7 @@ variables: - openstack-origin: &openstack-origin cloud:focal-xena + openstack-origin: &openstack-origin cloud:jammy-zed -series: &series focal +series: &series jammy machines: 0: @@ -69,7 +69,7 @@ applications: - '3' - '4' - '5' - channel: quincy/edge + channel: latest/edge ceph-mon: charm: ch:ceph-mon @@ -81,7 +81,7 @@ applications: - '6' - '7' - '8' - channel: quincy/edge + channel: latest/edge rabbitmq-server: charm: ch:rabbitmq-server @@ -99,7 +99,7 @@ applications: debug: true to: - '10' - channel: yoga/edge + channel: latest/edge placement: charm: ch:placement @@ -109,7 +109,7 @@ applications: openstack-origin: *openstack-origin to: - '11' - channel: yoga/edge + channel: latest/edge neutron-api: charm: ch:neutron-api @@ -122,7 +122,7 @@ applications: neutron-security-groups: true to: - '12' - channel: yoga/edge + channel: latest/edge keystone: charm: ch:keystone @@ -131,7 +131,7 @@ applications: openstack-origin: *openstack-origin to: - '13' - channel: yoga/edge + channel: latest/edge neutron-gateway: charm: ch:neutron-gateway @@ -141,7 +141,7 @@ applications: bridge-mappings: physnet1:br-ex to: - '14' - channel: yoga/edge + channel: latest/edge glance: charm: ch:glance @@ -150,11 +150,11 @@ applications: openstack-origin: *openstack-origin to: - '15' - channel: yoga/edge + channel: latest/edge neutron-openvswitch: charm: ch:neutron-openvswitch - channel: yoga/edge + channel: latest/edge cinder: charm: ch:cinder @@ -165,7 +165,7 @@ applications: glance-api-version: 2 to: - '16' - channel: yoga/edge + channel: latest/edge cinder-ceph: charm: ../../cinder-ceph.charm @@ -183,7 +183,7 @@ applications: debug: true to: - '17' - channel: yoga/edge + channel: latest/edge relations: diff --git a/tests/bundles/impish-xena-ec.yaml b/tests/bundles/kinetic-zed-ec.yaml similarity index 95% rename from tests/bundles/impish-xena-ec.yaml rename to tests/bundles/kinetic-zed-ec.yaml index 01cd116..5047b31 100644 --- a/tests/bundles/impish-xena-ec.yaml +++ b/tests/bundles/kinetic-zed-ec.yaml @@ -1,7 +1,7 @@ variables: openstack-origin: &openstack-origin distro -series: &series impish +series: &series kinetic machines: 0: @@ -75,7 +75,7 @@ applications: - '18' - '19' - '20' - channel: quincy/edge + channel: latest/edge ceph-mon: charm: ch:ceph-mon @@ -87,7 +87,7 @@ applications: - '6' - '7' - '8' - channel: quincy/edge + channel: latest/edge rabbitmq-server: charm: ch:rabbitmq-server @@ -105,7 +105,7 @@ applications: debug: true to: - '10' - channel: yoga/edge + channel: latest/edge placement: charm: ch:placement @@ -115,7 +115,7 @@ applications: openstack-origin: *openstack-origin to: - '11' - channel: yoga/edge + channel: latest/edge neutron-api: charm: ch:neutron-api @@ -128,7 +128,7 @@ applications: neutron-security-groups: true to: - '12' - channel: yoga/edge + channel: latest/edge keystone: charm: ch:keystone @@ -137,7 +137,7 @@ applications: openstack-origin: *openstack-origin to: - '13' - channel: yoga/edge + channel: latest/edge neutron-gateway: charm: ch:neutron-gateway @@ -147,7 +147,7 @@ applications: bridge-mappings: physnet1:br-ex to: - '14' - channel: yoga/edge + channel: latest/edge glance: charm: ch:glance @@ -156,11 +156,11 @@ applications: openstack-origin: *openstack-origin to: - '15' - channel: yoga/edge + channel: latest/edge neutron-openvswitch: charm: ch:neutron-openvswitch - channel: yoga/edge + channel: latest/edge cinder: charm: ch:cinder @@ -171,7 +171,7 @@ applications: glance-api-version: 2 to: - '16' - channel: yoga/edge + channel: latest/edge cinder-ceph: charm: ../../cinder-ceph.charm @@ -193,7 +193,7 @@ applications: debug: true to: - '17' - channel: yoga/edge + channel: latest/edge relations: diff --git a/tests/bundles/impish-xena.yaml b/tests/bundles/kinetic-zed.yaml similarity index 94% rename from tests/bundles/impish-xena.yaml rename to tests/bundles/kinetic-zed.yaml index 0c3d2cb..f227fe8 100644 --- a/tests/bundles/impish-xena.yaml +++ b/tests/bundles/kinetic-zed.yaml @@ -1,7 +1,7 @@ variables: openstack-origin: &openstack-origin distro -series: &series impish +series: &series kinetic machines: 0: @@ -69,7 +69,7 @@ applications: - '3' - '4' - '5' - channel: quincy/edge + channel: latest/edge ceph-mon: charm: ch:ceph-mon @@ -81,7 +81,7 @@ applications: - '6' - '7' - '8' - channel: quincy/edge + channel: latest/edge rabbitmq-server: charm: ch:rabbitmq-server @@ -99,7 +99,7 @@ applications: debug: true to: - '10' - channel: yoga/edge + channel: latest/edge placement: charm: ch:placement @@ -109,7 +109,7 @@ applications: openstack-origin: *openstack-origin to: - '11' - channel: yoga/edge + channel: latest/edge neutron-api: charm: ch:neutron-api @@ -122,7 +122,7 @@ applications: neutron-security-groups: true to: - '12' - channel: yoga/edge + channel: latest/edge keystone: charm: ch:keystone @@ -131,7 +131,7 @@ applications: openstack-origin: *openstack-origin to: - '13' - channel: yoga/edge + channel: latest/edge neutron-gateway: charm: ch:neutron-gateway @@ -141,7 +141,7 @@ applications: bridge-mappings: physnet1:br-ex to: - '14' - channel: yoga/edge + channel: latest/edge glance: charm: ch:glance @@ -150,11 +150,11 @@ applications: openstack-origin: *openstack-origin to: - '15' - channel: yoga/edge + channel: latest/edge neutron-openvswitch: charm: ch:neutron-openvswitch - channel: yoga/edge + channel: latest/edge cinder: charm: ch:cinder @@ -165,7 +165,7 @@ applications: glance-api-version: 2 to: - '16' - channel: yoga/edge + channel: latest/edge cinder-ceph: charm: ../../cinder-ceph.charm @@ -183,7 +183,7 @@ applications: debug: true to: - '17' - channel: yoga/edge + channel: latest/edge relations: diff --git a/tests/tests.yaml b/tests/tests.yaml index 5180cf7..4462bb2 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -5,20 +5,20 @@ comment: | cinder and ceph-mon zaza charm tests. smoke_bundles: - - focal-xena + - jammy-yoga gate_bundles: - - focal-xena-ec - - focal-xena - - impish-xena-ec - - impish-xena - -dev_bundles: - - focal-yoga-ec - - focal-yoga - jammy-yoga-ec - jammy-yoga +dev_bundles: + - jammy-yoga-ec + - jammy-yoga + - jammy-zed-ec + - jammy-zed + - kinetic-zed-ec + - kinetic-zed + configure: - zaza.openstack.charm_tests.glance.setup.add_cirros_image - zaza.openstack.charm_tests.glance.setup.add_lts_image @@ -45,7 +45,5 @@ tests_options: policyd: service: cinder force_deploy: - - impish-xena - - impish-xena-ec - - jammy-yoga - - jammy-yoga-ec + - kinetic-zed + - kinetic-zed-ec diff --git a/tox.ini b/tox.ini index c41077d..bddbd1f 100644 --- a/tox.ini +++ b/tox.ini @@ -48,42 +48,23 @@ basepython = python3 deps = -r{toxinidir}/build-requirements.txt commands = charmcraft clean - charmcraft -v build + charmcraft -v pack {toxinidir}/rename.sh +[testenv:py310] +basepython = python3.10 +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + [testenv:py3] basepython = python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -[testenv:py36] -basepython = python3.6 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py38] -basepython = python3.8 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py39] -basepython = python3.9 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py310] -basepython = python3.10 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - [testenv:pep8] basepython = python3 deps = flake8==3.9.2 - charm-tools==2.8.3 + git+https://github.com/juju/charm-tools.git commands = flake8 {posargs} hooks unit_tests tests actions lib files charm-proof