From 80f34d9d01b73114e73417c0ad8b6e4d87f22f78 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Wed, 8 Jul 2026 21:06:59 +0200 Subject: [PATCH] Drop next-generation mariadb/rabbitmq/loadbalancer roles The "-ng" roles were only ever a tech preview intended to improve the regular mariadb, rabbitmq and loadbalancer plays and were never maintained intensively. Use the regular role names instead of the "-ng" variants: - Rename the "mariadb-ng" and "rabbitmq-ng" roles to "mariadb" and "rabbitmq" in MAP_ROLE2ROLE, keeping their dependency trees intact. - Drop the "loadbalancer-ng" special case in apply, so "loadbalancer" runs through the regular kolla path, and remove the now-unused kolla_action_ng handling and LOADBALANCER_PLAYBOOKS list. This complements the removal of the kolla-*-ng playbooks in osism/container-image-kolla-ansible#929. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Christian Berendt --- osism/commands/apply.py | 24 +-------------------- osism/data/enums.py | 40 ++++++----------------------------- tests/unit/data/test_enums.py | 33 ----------------------------- 3 files changed, 7 insertions(+), 90 deletions(-) diff --git a/osism/commands/apply.py b/osism/commands/apply.py index c2b67e38..423fa7ac 100644 --- a/osism/commands/apply.py +++ b/osism/commands/apply.py @@ -279,7 +279,6 @@ def _prepare_task( timeout, task_timeout, ): - from celery import group from osism.data.playbooks import MAP_ROLE2ENVIRONMENT, MAP_ROLE2RUNTIME from osism.tasks import ansible, ceph, kolla, kubernetes @@ -312,24 +311,6 @@ def _prepare_task( t = kubernetes.run.si( environment, role, arguments, auto_release_time=task_timeout ) - elif role == "loadbalancer-ng": - if sub: - environment = f"{environment}.{sub}" - g = group( - kolla.run.si( - environment, playbook, arguments, auto_release_time=task_timeout - ) - for playbook in enums.LOADBALANCER_PLAYBOOKS - ) - t = ( - kolla.run.si( - environment, - "loadbalancer-ng", - arguments, - auto_release_time=task_timeout, - ) - | g - ) elif environment == "kolla": if sub: environment = f"{environment}.{sub}" @@ -337,10 +318,7 @@ def _prepare_task( if role.startswith("kolla-"): role = role[6:] - if role in ["mariadb-ng", "rabbitmq-ng"]: - kolla_arguments = [f"-e kolla_action_ng={action}"] + arguments - else: - kolla_arguments = [f"-e kolla_action={action}"] + arguments + kolla_arguments = [f"-e kolla_action={action}"] + arguments if ( role not in ["common"] diff --git a/osism/data/enums.py b/osism/data/enums.py index 6c14e070..b9562c4d 100644 --- a/osism/data/enums.py +++ b/osism/data/enums.py @@ -23,34 +23,6 @@ def __init__(self, name, dependencies=None): self.dependencies = dependencies or [] -LOADBALANCER_PLAYBOOKS = [ - "loadbalancer-aodh", - "loadbalancer-barbican", - "loadbalancer-blazar", - "loadbalancer-ceph-rgw", - "loadbalancer-cinder", - "loadbalancer-designate", - "loadbalancer-glance", - "loadbalancer-gnocchi", - "loadbalancer-grafana", - "loadbalancer-heat", - "loadbalancer-horizon", - "loadbalancer-ironic", - "loadbalancer-keystone", - "loadbalancer-magnum", - "loadbalancer-manila", - "loadbalancer-mariadb", - "loadbalancer-memcached", - "loadbalancer-neutron", - "loadbalancer-nova", - "loadbalancer-octavia", - "loadbalancer-opensearch", - "loadbalancer-placement", - "loadbalancer-prometheus", - "loadbalancer-rabbitmq", - "loadbalancer-skydive", -] - VALIDATE_PLAYBOOKS = { "barbican-config": { "runtime": "kolla-ansible", @@ -158,7 +130,7 @@ def __init__(self, name, dependencies=None): dependencies=[ Role("opensearch"), Role( - "mariadb-ng", + "mariadb", dependencies=[ Role("horizon"), Role( @@ -187,7 +159,7 @@ def __init__(self, name, dependencies=None): Role("openvswitch", dependencies=[Role("ovn")]), Role("memcached"), Role("redis"), - Role("rabbitmq-ng"), + Role("rabbitmq"), ], ), Role( @@ -242,13 +214,13 @@ def __init__(self, name, dependencies=None): dependencies=[ Role("letsencrypt"), Role("opensearch"), - Role("mariadb-ng"), + Role("mariadb"), ], ), Role("openvswitch", dependencies=[Role("ovn")]), Role("memcached"), Role("redis"), - Role("rabbitmq-ng"), + Role("rabbitmq"), ], ), ], @@ -386,13 +358,13 @@ def __init__(self, name, dependencies=None): dependencies=[ Role("letsencrypt"), Role("opensearch"), - Role("mariadb-ng"), + Role("mariadb"), ], ), Role("openvswitch", dependencies=[Role("ovn")]), Role("memcached"), Role("redis"), - Role("rabbitmq-ng"), + Role("rabbitmq"), ], ), ], diff --git a/tests/unit/data/test_enums.py b/tests/unit/data/test_enums.py index da485f0f..f1706248 100644 --- a/tests/unit/data/test_enums.py +++ b/tests/unit/data/test_enums.py @@ -1,7 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 from osism.data.enums import ( - LOADBALANCER_PLAYBOOKS, MAP_ROLE2ROLE, VALIDATE_PLAYBOOKS, Role, @@ -97,38 +96,6 @@ def test_role_accepts_nested_dependencies(): assert role.dependencies[0].dependencies[0].name == "nova" -# --------------------------------------------------------------------------- -# LOADBALANCER_PLAYBOOKS -# --------------------------------------------------------------------------- - - -def test_loadbalancer_playbooks_is_non_empty_list(): - assert isinstance(LOADBALANCER_PLAYBOOKS, list) - assert LOADBALANCER_PLAYBOOKS - - -def test_loadbalancer_playbooks_entries_are_non_empty_strings(): - for entry in LOADBALANCER_PLAYBOOKS: - assert isinstance(entry, str) - assert entry - - -def test_loadbalancer_playbooks_entries_share_prefix(): - for entry in LOADBALANCER_PLAYBOOKS: - assert entry.startswith("loadbalancer-") - - -def test_loadbalancer_playbooks_entries_have_service_suffix(): - for entry in LOADBALANCER_PLAYBOOKS: - suffix = entry.removeprefix("loadbalancer-") - assert suffix - assert not suffix.startswith("-") - - -def test_loadbalancer_playbooks_has_no_duplicates(): - assert len(LOADBALANCER_PLAYBOOKS) == len(set(LOADBALANCER_PLAYBOOKS)) - - # --------------------------------------------------------------------------- # VALIDATE_PLAYBOOKS # ---------------------------------------------------------------------------