From 587e1c72dfdd2a0efb5eac58fd177739b72207c8 Mon Sep 17 00:00:00 2001 From: Micah Culpepper Date: Thu, 12 Dec 2024 14:00:58 -0600 Subject: [PATCH 1/3] feat(neutron): enable trunk plugin --- components/neutron/aio-values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/neutron/aio-values.yaml b/components/neutron/aio-values.yaml index 9b6a70ed..fa3bef87 100644 --- a/components/neutron/aio-values.yaml +++ b/components/neutron/aio-values.yaml @@ -52,7 +52,7 @@ conf: type_drivers: "vlan,local,understack_vxlan" neutron: DEFAULT: - service_plugins: "l3_understack,segments" + service_plugins: "l3_understack,segments,trunk" # we don't want HA L3 routers. It's a Python value so we need to quote it in YAML. l3_ha: "False" # we aren't using availability zones so having calls attempt to add things to From 312f50c9f1dd7f8288d0631dff2a86ff48077720 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Thu, 12 Dec 2024 18:11:57 -0600 Subject: [PATCH 2/3] feat(neutron): add no-op trunk driver This adds an effectively no-op trunk driver for the understack mechanism driver. --- .../neutron_understack_mech.py | 2 ++ .../neutron_understack/trunk.py | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 python/neutron-understack/neutron_understack/trunk.py diff --git a/python/neutron-understack/neutron_understack/neutron_understack_mech.py b/python/neutron-understack/neutron_understack/neutron_understack_mech.py index 8abb5a02..51e95810 100644 --- a/python/neutron-understack/neutron_understack/neutron_understack_mech.py +++ b/python/neutron-understack/neutron_understack/neutron_understack_mech.py @@ -14,6 +14,7 @@ from neutron_understack import config from neutron_understack.nautobot import Nautobot +from neutron_understack.trunk import UnderStackTrunkDriver from neutron_understack.undersync import Undersync LOG = logging.getLogger(__name__) @@ -110,6 +111,7 @@ def initialize(self): conf = cfg.CONF.ml2_understack self.nb = Nautobot(conf.nb_url, conf.nb_token) self.undersync = Undersync(conf.undersync_token, conf.undersync_url) + self.trunk_driver = UnderStackTrunkDriver.create(self) def create_network_precommit(self, context): log_call("create_network_precommit", context) diff --git a/python/neutron-understack/neutron_understack/trunk.py b/python/neutron-understack/neutron_understack/trunk.py new file mode 100644 index 00000000..78aebe73 --- /dev/null +++ b/python/neutron-understack/neutron_understack/trunk.py @@ -0,0 +1,28 @@ +from neutron.services.trunk.drivers import base as trunk_base +from neutron_lib.api.definitions import portbindings +from neutron_lib.services.trunk import constants as trunk_consts +from oslo_config import cfg + +SUPPORTED_INTERFACES = (portbindings.VIF_TYPE_OTHER,) + +SUPPORTED_SEGMENTATION_TYPES = (trunk_consts.SEGMENTATION_TYPE_VLAN,) + + +class UnderStackTrunkDriver(trunk_base.DriverBase): + @property + def is_loaded(self): + try: + return "understack" in cfg.CONF.ml2.mechanism_drivers + except cfg.NoSuchOptError: + return False + + @classmethod + def create(cls, plugin_driver): + cls.plugin_driver = plugin_driver + return cls( + "understack", + SUPPORTED_INTERFACES, + SUPPORTED_SEGMENTATION_TYPES, + None, + can_trunk_bound_port=True, + ) From b2b224d76e116e145d47e74f045ab9db0f26982a Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Thu, 12 Dec 2024 18:16:47 -0600 Subject: [PATCH 3/3] DNM: use PR neutron for testing --- components/openstack-2024.2-jammy.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/components/openstack-2024.2-jammy.yaml b/components/openstack-2024.2-jammy.yaml index 70a30746..5771e2c1 100644 --- a/components/openstack-2024.2-jammy.yaml +++ b/components/openstack-2024.2-jammy.yaml @@ -35,18 +35,18 @@ images: ironic_retrive_swift_config: "docker.io/openstackhelm/heat:2024.2-ubuntu_jammy" # neutron - neutron_db_sync: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_dhcp: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_l3: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_l2gw: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_linuxbridge_agent: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_metadata: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_ovn_metadata: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_openvswitch_agent: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_server: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_rpc_server: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_bagpipe_bgp: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" - neutron_netns_cleanup_cron: "ghcr.io/rackerlabs/understack/neutron:2024.2-ubuntu_jammy" + neutron_db_sync: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_dhcp: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_l3: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_l2gw: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_linuxbridge_agent: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_metadata: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_ovn_metadata: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_openvswitch_agent: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_server: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_rpc_server: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_bagpipe_bgp: "ghcr.io/rackerlabs/understack/neutron:pr-552" + neutron_netns_cleanup_cron: "ghcr.io/rackerlabs/understack/neutron:pr-552" # nova nova_api: "docker.io/openstackhelm/nova:2024.2-ubuntu_jammy"