Sync/rebuild for Dalmatian/Epoxy updates

Refresh and rebuild charm for awareness of Dalmatian and Epoxy
Cloud Archive releases.

Change-Id: I77a2390481856ae3d78a619794bccd8378e338c1
This commit is contained in:
James Page 2024-11-15 12:09:41 +00:00
parent b22ae76b6f
commit 1ad934bd49
No known key found for this signature in database
GPG Key ID: BFECAECBA0E7D8C3
7 changed files with 48 additions and 8 deletions

View File

@ -162,6 +162,8 @@ OPENSTACK_CODENAMES = OrderedDict([
('2023.1', 'antelope'),
('2023.2', 'bobcat'),
('2024.1', 'caracal'),
('2024.2', 'dalmatian'),
('2025.1', 'epoxy'),
])
# The ugly duckling - must list releases oldest to newest

View File

@ -18,7 +18,10 @@
# Charm Helpers Developers <juju@lists.ubuntu.com>
import copy
from distutils.version import LooseVersion
try:
from distutils.version import LooseVersion
except ImportError:
from looseversion import LooseVersion
from enum import Enum
from functools import wraps
from collections import namedtuple, UserDict

View File

@ -33,6 +33,8 @@ UBUNTU_RELEASES = (
'kinetic',
'lunar',
'mantic',
'noble',
'oracular',
)

View File

@ -254,6 +254,22 @@ CLOUD_ARCHIVE_POCKETS = {
'caracal/proposed': 'jammy-proposed/caracal',
'jammy-caracal/proposed': 'jammy-proposed/caracal',
'jammy-proposed/caracal': 'jammy-proposed/caracal',
# dalmatian
'dalmatian': 'noble-updates/dalmatian',
'noble-dalmatian': 'noble-updates/dalmatian',
'noble-dalmatian/updates': 'noble-updates/dalmatian',
'noble-updates/dalmatian': 'noble-updates/dalmatian',
'dalmatian/proposed': 'noble-proposed/dalmatian',
'noble-dalmatian/proposed': 'noble-proposed/dalmatian',
'noble-proposed/dalmatian': 'noble-proposed/dalmatian',
# epoxy
'epoxy': 'noble-updates/epoxy',
'noble-epoxy': 'noble-updates/epoxy',
'noble-epoxy/updates': 'noble-updates/epoxy',
'noble-updates/epoxy': 'noble-updates/epoxy',
'epoxy/proposed': 'noble-proposed/epoxy',
'noble-epoxy/proposed': 'noble-proposed/epoxy',
'noble-proposed/epoxy': 'noble-proposed/epoxy',
# OVN
'focal-ovn-22.03': 'focal-updates/ovn-22.03',
@ -288,6 +304,8 @@ OPENSTACK_RELEASES = (
'antelope',
'bobcat',
'caracal',
'dalmatian',
'epoxy',
)
@ -318,6 +336,8 @@ UBUNTU_OPENSTACK_RELEASE = OrderedDict([
('lunar', 'antelope'),
('mantic', 'bobcat'),
('noble', 'caracal'),
('oracular', 'dalmatian'),
('plucky', 'epoxy'),
])

View File

@ -1541,11 +1541,11 @@ def get_devices(name):
def osdize(dev, osd_format, osd_journal, ignore_errors=False, encrypt=False,
key_manager=CEPH_KEY_MANAGER, osd_id=None):
key_manager=CEPH_KEY_MANAGER, osd_id=None, bluestore_skip=None):
if dev.startswith('/dev'):
osdize_dev(dev, osd_format, osd_journal,
ignore_errors, encrypt,
key_manager, osd_id)
key_manager, osd_id, bluestore_skip)
else:
if cmp_pkgrevno('ceph', '14.0.0') >= 0:
log("Directory backed OSDs can not be created on Nautilus",
@ -1556,7 +1556,7 @@ def osdize(dev, osd_format, osd_journal, ignore_errors=False, encrypt=False,
def osdize_dev(dev, osd_format, osd_journal, ignore_errors=False,
encrypt=False, key_manager=CEPH_KEY_MANAGER,
osd_id=None):
osd_id=None, bluestore_skip=None):
"""
Prepare a block device for use as a Ceph OSD
@ -1570,6 +1570,8 @@ def osdize_dev(dev, osd_format, osd_journal, ignore_errors=False,
processing
:param: encrypt: Encrypt block devices using 'key_manager'
:param: key_manager: Key management approach for encryption keys
:param: osd_id: The ID for the newly created OSD
:param: bluestore_skip: Bluestore parameters to skip ('wal' and/or 'db')
:raises subprocess.CalledProcessError: in the event that any supporting
subprocess operation failed
:raises ValueError: if an invalid key_manager is provided
@ -1620,7 +1622,8 @@ def osdize_dev(dev, osd_format, osd_journal, ignore_errors=False,
osd_journal,
encrypt,
key_manager,
osd_id)
osd_id,
bluestore_skip)
else:
cmd = _ceph_disk(dev,
osd_format,
@ -1694,7 +1697,7 @@ def _ceph_disk(dev, osd_format, osd_journal, encrypt=False):
def _ceph_volume(dev, osd_journal, encrypt=False, key_manager=CEPH_KEY_MANAGER,
osd_id=None):
osd_id=None, bluestore_skip=None):
"""
Prepare and activate a device for usage as a Ceph OSD using ceph-volume.
@ -1706,6 +1709,7 @@ def _ceph_volume(dev, osd_journal, encrypt=False, key_manager=CEPH_KEY_MANAGER,
:param: encrypt: Use block device encryption
:param: key_manager: dm-crypt Key Manager to use
:param: osd_id: The OSD-id to recycle, or None to create a new one
:param: bluestore_skip: Bluestore parameters to skip ('wal' and/or 'db')
:raises subprocess.CalledProcessError: in the event that any supporting
LVM operation failed.
:returns: list. 'ceph-volume' command and required parameters for
@ -1732,7 +1736,11 @@ def _ceph_volume(dev, osd_journal, encrypt=False, key_manager=CEPH_KEY_MANAGER,
encrypt=encrypt,
key_manager=key_manager))
for extra_volume in ('wal', 'db'):
extras = ('wal', 'db')
if bluestore_skip:
extras = tuple(set(extras) - set(bluestore_skip))
for extra_volume in extras:
devices = get_devices('bluestore-{}'.format(extra_volume))
if devices:
cmd.append('--block.{}'.format(extra_volume))

View File

@ -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.
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
requests>=2.18.4
@ -27,3 +26,4 @@ git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.open
git+https://opendev.org/openstack/tempest.git#egg=tempest
croniter # needed for charm-rabbitmq-server unit tests
psutil

View File

@ -50,6 +50,11 @@ basepython = python3.10
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py312]
basepython = python3.12
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py3]
basepython = python3
deps = -r{toxinidir}/requirements.txt