Add 2023.2 Bobcat support
* sync charm-helpers to classic charms * change openstack-origin/source default to bobcat * add mantic to metadata series * align testing with bobcat * add new bobcat bundles * add bobcat bundles to tests.yaml * add bobcat tests to osci.yaml * update build-on and run-on bases * drop kinetic * update charmcraft_channel to 2.x/stable Change-Id: I3dd29fd9d9e5e7057dc50b03a4a3945d1c7178d2
This commit is contained in:
parent
20a5dc391f
commit
8045849848
|
@ -31,9 +31,9 @@ bases:
|
||||||
- name: ubuntu
|
- name: ubuntu
|
||||||
channel: "22.04"
|
channel: "22.04"
|
||||||
architectures: [amd64, s390x, ppc64el, arm64]
|
architectures: [amd64, s390x, ppc64el, arm64]
|
||||||
- name: ubuntu
|
|
||||||
channel: "22.10"
|
|
||||||
architectures: [amd64, s390x, ppc64el, arm64]
|
|
||||||
- name: ubuntu
|
- name: ubuntu
|
||||||
channel: "23.04"
|
channel: "23.04"
|
||||||
architectures: [amd64, s390x, ppc64el, arm64]
|
architectures: [amd64, s390x, ppc64el, arm64]
|
||||||
|
- name: ubuntu
|
||||||
|
channel: "23.10"
|
||||||
|
architectures: [amd64, s390x, ppc64el, arm64]
|
||||||
|
|
|
@ -409,6 +409,9 @@ def get_requests_for_local_unit(relation_name=None):
|
||||||
relation_name = relation_name or 'certificates'
|
relation_name = relation_name or 'certificates'
|
||||||
bundles = []
|
bundles = []
|
||||||
for rid in relation_ids(relation_name):
|
for rid in relation_ids(relation_name):
|
||||||
|
sent = relation_get(rid=rid, unit=local_unit())
|
||||||
|
legacy_keys = ['certificate_name', 'common_name']
|
||||||
|
is_legacy_request = set(sent).intersection(legacy_keys)
|
||||||
for unit in related_units(rid):
|
for unit in related_units(rid):
|
||||||
data = relation_get(rid=rid, unit=unit)
|
data = relation_get(rid=rid, unit=unit)
|
||||||
if data.get(raw_certs_key):
|
if data.get(raw_certs_key):
|
||||||
|
@ -416,6 +419,14 @@ def get_requests_for_local_unit(relation_name=None):
|
||||||
'ca': data['ca'],
|
'ca': data['ca'],
|
||||||
'chain': data.get('chain'),
|
'chain': data.get('chain'),
|
||||||
'certs': json.loads(data[raw_certs_key])})
|
'certs': json.loads(data[raw_certs_key])})
|
||||||
|
elif is_legacy_request:
|
||||||
|
bundles.append({
|
||||||
|
'ca': data['ca'],
|
||||||
|
'chain': data.get('chain'),
|
||||||
|
'certs': {sent['common_name']:
|
||||||
|
{'cert': data.get(local_name + '.server.cert'),
|
||||||
|
'key': data.get(local_name + '.server.key')}}})
|
||||||
|
|
||||||
return bundles
|
return bundles
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1748,6 +1748,9 @@ class WSGIWorkerConfigContext(WorkerConfigContext):
|
||||||
|
|
||||||
def __call__(self):
|
def __call__(self):
|
||||||
total_processes = _calculate_workers()
|
total_processes = _calculate_workers()
|
||||||
|
enable_wsgi_rotation = config('wsgi-rotation')
|
||||||
|
if enable_wsgi_rotation is None:
|
||||||
|
enable_wsgi_rotation = True
|
||||||
ctxt = {
|
ctxt = {
|
||||||
"service_name": self.service_name,
|
"service_name": self.service_name,
|
||||||
"user": self.user,
|
"user": self.user,
|
||||||
|
@ -1761,6 +1764,7 @@ class WSGIWorkerConfigContext(WorkerConfigContext):
|
||||||
"public_processes": int(math.ceil(self.public_process_weight *
|
"public_processes": int(math.ceil(self.public_process_weight *
|
||||||
total_processes)),
|
total_processes)),
|
||||||
"threads": 1,
|
"threads": 1,
|
||||||
|
"wsgi_rotation": enable_wsgi_rotation,
|
||||||
}
|
}
|
||||||
return ctxt
|
return ctxt
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ signing_dir = {{ signing_dir }}
|
||||||
{% if service_type -%}
|
{% if service_type -%}
|
||||||
service_type = {{ service_type }}
|
service_type = {{ service_type }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
{% if admin_role -%}
|
||||||
service_token_roles = {{ admin_role }}
|
service_token_roles = {{ admin_role }}
|
||||||
service_token_roles_required = True
|
service_token_roles_required = True
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
{% endif -%}
|
||||||
|
|
|
@ -22,6 +22,8 @@ signing_dir = {{ signing_dir }}
|
||||||
{% if use_memcache == true %}
|
{% if use_memcache == true %}
|
||||||
memcached_servers = {{ memcache_url }}
|
memcached_servers = {{ memcache_url }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
{% if admin_role -%}
|
||||||
service_token_roles = {{ admin_role }}
|
service_token_roles = {{ admin_role }}
|
||||||
service_token_roles_required = True
|
service_token_roles_required = True
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
{% endif -%}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
send_service_user_token = true
|
send_service_user_token = true
|
||||||
auth_type = password
|
auth_type = password
|
||||||
auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
|
auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
|
||||||
project_domain_id = default
|
project_domain_name = service_domain
|
||||||
user_domain_id = default
|
user_domain_name = service_domain
|
||||||
project_name = {{ admin_tenant_name }}
|
project_name = {{ admin_tenant_name }}
|
||||||
username = {{ admin_user }}
|
username = {{ admin_user }}
|
||||||
password = {{ admin_password }}
|
password = {{ admin_password }}
|
||||||
|
|
|
@ -12,6 +12,12 @@ Listen {{ admin_port }}
|
||||||
Listen {{ public_port }}
|
Listen {{ public_port }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
|
{% if wsgi_rotation -%}
|
||||||
|
WSGISocketRotation On
|
||||||
|
{% else -%}
|
||||||
|
WSGISocketRotation Off
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
{% if port -%}
|
{% if port -%}
|
||||||
<VirtualHost *:{{ port }}>
|
<VirtualHost *:{{ port }}>
|
||||||
WSGIDaemonProcess {{ service_name }} processes={{ processes }} threads={{ threads }} user={{ user }} group={{ group }} \
|
WSGIDaemonProcess {{ service_name }} processes={{ processes }} threads={{ threads }} user={{ user }} group={{ group }} \
|
||||||
|
|
|
@ -12,6 +12,12 @@ Listen {{ admin_port }}
|
||||||
Listen {{ public_port }}
|
Listen {{ public_port }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
|
{% if wsgi_rotation -%}
|
||||||
|
WSGISocketRotation On
|
||||||
|
{% else -%}
|
||||||
|
WSGISocketRotation Off
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
{% if port -%}
|
{% if port -%}
|
||||||
<VirtualHost *:{{ port }}>
|
<VirtualHost *:{{ port }}>
|
||||||
WSGIDaemonProcess {{ service_name }} processes={{ processes }} threads={{ threads }} user={{ user }} group={{ group }} \
|
WSGIDaemonProcess {{ service_name }} processes={{ processes }} threads={{ threads }} user={{ user }} group={{ group }} \
|
||||||
|
|
|
@ -160,6 +160,7 @@ OPENSTACK_CODENAMES = OrderedDict([
|
||||||
('2022.1', 'yoga'),
|
('2022.1', 'yoga'),
|
||||||
('2022.2', 'zed'),
|
('2022.2', 'zed'),
|
||||||
('2023.1', 'antelope'),
|
('2023.1', 'antelope'),
|
||||||
|
('2023.2', 'bobcat'),
|
||||||
])
|
])
|
||||||
|
|
||||||
# The ugly duckling - must list releases oldest to newest
|
# The ugly duckling - must list releases oldest to newest
|
||||||
|
|
|
@ -32,6 +32,7 @@ UBUNTU_RELEASES = (
|
||||||
'jammy',
|
'jammy',
|
||||||
'kinetic',
|
'kinetic',
|
||||||
'lunar',
|
'lunar',
|
||||||
|
'mantic',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -238,6 +238,14 @@ CLOUD_ARCHIVE_POCKETS = {
|
||||||
'antelope/proposed': 'jammy-proposed/antelope',
|
'antelope/proposed': 'jammy-proposed/antelope',
|
||||||
'jammy-antelope/proposed': 'jammy-proposed/antelope',
|
'jammy-antelope/proposed': 'jammy-proposed/antelope',
|
||||||
'jammy-proposed/antelope': 'jammy-proposed/antelope',
|
'jammy-proposed/antelope': 'jammy-proposed/antelope',
|
||||||
|
# bobcat
|
||||||
|
'bobcat': 'jammy-updates/bobcat',
|
||||||
|
'jammy-bobcat': 'jammy-updates/bobcat',
|
||||||
|
'jammy-bobcat/updates': 'jammy-updates/bobcat',
|
||||||
|
'jammy-updates/bobcat': 'jammy-updates/bobcat',
|
||||||
|
'bobcat/proposed': 'jammy-proposed/bobcat',
|
||||||
|
'jammy-bobcat/proposed': 'jammy-proposed/bobcat',
|
||||||
|
'jammy-proposed/bobcat': 'jammy-proposed/bobcat',
|
||||||
|
|
||||||
# OVN
|
# OVN
|
||||||
'focal-ovn-22.03': 'focal-updates/ovn-22.03',
|
'focal-ovn-22.03': 'focal-updates/ovn-22.03',
|
||||||
|
@ -270,6 +278,7 @@ OPENSTACK_RELEASES = (
|
||||||
'yoga',
|
'yoga',
|
||||||
'zed',
|
'zed',
|
||||||
'antelope',
|
'antelope',
|
||||||
|
'bobcat',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -298,6 +307,7 @@ UBUNTU_OPENSTACK_RELEASE = OrderedDict([
|
||||||
('jammy', 'yoga'),
|
('jammy', 'yoga'),
|
||||||
('kinetic', 'zed'),
|
('kinetic', 'zed'),
|
||||||
('lunar', 'antelope'),
|
('lunar', 'antelope'),
|
||||||
|
('mantic', 'bobcat'),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -122,13 +122,12 @@ class Cache(object):
|
||||||
:raises: subprocess.CalledProcessError
|
:raises: subprocess.CalledProcessError
|
||||||
"""
|
"""
|
||||||
pkgs = {}
|
pkgs = {}
|
||||||
cmd = ['dpkg-query', '--list']
|
cmd = [
|
||||||
|
'dpkg-query', '--show',
|
||||||
|
'--showformat',
|
||||||
|
r'${db:Status-Abbrev}\t${Package}\t${Version}\t${Architecture}\t${binary:Summary}\n'
|
||||||
|
]
|
||||||
cmd.extend(packages)
|
cmd.extend(packages)
|
||||||
if locale.getlocale() == (None, None):
|
|
||||||
# subprocess calls out to locale.getpreferredencoding(False) to
|
|
||||||
# determine encoding. Workaround for Trusty where the
|
|
||||||
# environment appears to not be set up correctly.
|
|
||||||
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
|
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(cmd,
|
output = subprocess.check_output(cmd,
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
|
@ -140,24 +139,17 @@ class Cache(object):
|
||||||
if cp.returncode != 1:
|
if cp.returncode != 1:
|
||||||
raise
|
raise
|
||||||
output = cp.output
|
output = cp.output
|
||||||
headings = []
|
|
||||||
for line in output.splitlines():
|
for line in output.splitlines():
|
||||||
if line.startswith('||/'):
|
# only process lines for successfully installed packages
|
||||||
headings = line.split()
|
if not (line.startswith('ii ') or line.startswith('hi ')):
|
||||||
headings.pop(0)
|
|
||||||
continue
|
continue
|
||||||
elif (line.startswith('|') or line.startswith('+') or
|
status, name, version, arch, desc = line.split('\t', 4)
|
||||||
line.startswith('dpkg-query:')):
|
pkgs[name] = {
|
||||||
continue
|
'name': name,
|
||||||
else:
|
'version': version,
|
||||||
data = line.split(None, 4)
|
'architecture': arch,
|
||||||
status = data.pop(0)
|
'description': desc,
|
||||||
if status not in ('ii', 'hi'):
|
}
|
||||||
continue
|
|
||||||
pkg = {}
|
|
||||||
pkg.update({k.lower(): v for k, v in zip(headings, data)})
|
|
||||||
if 'name' in pkg:
|
|
||||||
pkgs.update({pkg['name']: pkg})
|
|
||||||
return pkgs
|
return pkgs
|
||||||
|
|
||||||
def _apt_cache_show(self, packages):
|
def _apt_cache_show(self, packages):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
options:
|
options:
|
||||||
openstack-origin:
|
openstack-origin:
|
||||||
default: antelope
|
default: bobcat
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
Repository from which to install. May be one of the following:
|
Repository from which to install. May be one of the following:
|
||||||
|
|
|
@ -20,8 +20,8 @@ tags:
|
||||||
- file-servers
|
- file-servers
|
||||||
series:
|
series:
|
||||||
- jammy
|
- jammy
|
||||||
- kinetic
|
|
||||||
- lunar
|
- lunar
|
||||||
|
- mantic
|
||||||
extra-bindings:
|
extra-bindings:
|
||||||
replication:
|
replication:
|
||||||
cluster:
|
cluster:
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
needs_charm_build: true
|
needs_charm_build: true
|
||||||
charm_build_name: swift-storage
|
charm_build_name: swift-storage
|
||||||
build_type: charmcraft
|
build_type: charmcraft
|
||||||
charmcraft_channel: 2.1/stable
|
charmcraft_channel: 2.x/stable
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
variables:
|
variables:
|
||||||
openstack-origin: &openstack-origin cloud:jammy-zed
|
openstack-origin: &openstack-origin cloud:jammy-bobcat
|
||||||
|
|
||||||
series: jammy
|
series: jammy
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
variables:
|
||||||
|
openstack-origin: &openstack-origin distro
|
||||||
|
|
||||||
|
series: mantic
|
||||||
|
|
||||||
|
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':
|
||||||
|
|
||||||
|
applications:
|
||||||
|
|
||||||
|
keystone-mysql-router:
|
||||||
|
charm: ch:mysql-router
|
||||||
|
channel: latest/edge
|
||||||
|
glance-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:
|
||||||
|
expose: True
|
||||||
|
charm: ch:keystone
|
||||||
|
num_units: 1
|
||||||
|
options:
|
||||||
|
openstack-origin: *openstack-origin
|
||||||
|
to:
|
||||||
|
- '3'
|
||||||
|
channel: latest/edge
|
||||||
|
|
||||||
|
swift-proxy:
|
||||||
|
charm: ch:swift-proxy
|
||||||
|
num_units: 1
|
||||||
|
options:
|
||||||
|
zone-assignment: manual
|
||||||
|
replicas: 1
|
||||||
|
swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae
|
||||||
|
openstack-origin: *openstack-origin
|
||||||
|
to:
|
||||||
|
- '4'
|
||||||
|
channel: latest/edge
|
||||||
|
|
||||||
|
glance:
|
||||||
|
expose: True
|
||||||
|
charm: ch:glance
|
||||||
|
num_units: 1
|
||||||
|
options:
|
||||||
|
openstack-origin: *openstack-origin
|
||||||
|
to:
|
||||||
|
- '5'
|
||||||
|
channel: latest/edge
|
||||||
|
|
||||||
|
swift-storage:
|
||||||
|
charm: ../../swift-storage.charm
|
||||||
|
num_units: 1
|
||||||
|
storage:
|
||||||
|
block-devices: 'cinder,10G'
|
||||||
|
options:
|
||||||
|
zone: 1
|
||||||
|
openstack-origin: *openstack-origin
|
||||||
|
to:
|
||||||
|
- '6'
|
||||||
|
|
||||||
|
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'
|
||||||
|
|
||||||
|
- - 'glance:identity-service'
|
||||||
|
- 'keystone:identity-service'
|
||||||
|
|
||||||
|
- - 'swift-proxy:identity-service'
|
||||||
|
- 'keystone:identity-service'
|
||||||
|
|
||||||
|
- - 'swift-storage:swift-storage'
|
||||||
|
- 'swift-proxy:swift-storage'
|
||||||
|
|
||||||
|
- - 'glance:object-store'
|
||||||
|
- 'swift-proxy:object-store'
|
|
@ -1,14 +1,15 @@
|
||||||
charm_name: swift-storage
|
charm_name: swift-storage
|
||||||
|
|
||||||
gate_bundles:
|
gate_bundles:
|
||||||
- jammy-zed
|
- jammy-antelope
|
||||||
|
|
||||||
smoke_bundles:
|
smoke_bundles:
|
||||||
- jammy-zed
|
- jammy-antelope
|
||||||
|
|
||||||
dev_bundles:
|
dev_bundles:
|
||||||
- jammy-antelope
|
- jammy-bobcat
|
||||||
- lunar-antelope
|
- lunar-antelope
|
||||||
|
- mantic-bobcat
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
- zaza.openstack.charm_tests.swift.tests.SwiftImageCreateTest
|
- zaza.openstack.charm_tests.swift.tests.SwiftImageCreateTest
|
||||||
|
@ -19,3 +20,4 @@ tests:
|
||||||
tests_options:
|
tests_options:
|
||||||
force_deploy:
|
force_deploy:
|
||||||
- lunar-antelope
|
- lunar-antelope
|
||||||
|
- mantic-bobcat
|
||||||
|
|
Loading…
Reference in New Issue