From ed8c87d210b83dfe46c71d9b00a27bb65c90c5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Tue, 31 Mar 2026 23:04:30 +0200 Subject: [PATCH 1/2] Add ML2 baremetal mechanism driver support for Ironic adoption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configure Neutron to include the baremetal mechanism driver when Ironic adoption is enabled. This adds a new patch configuration that extends ml2MechanismDrivers to include both ovn and baremetal, and applies it conditionally during the neutron_adoption role when ironic_adoption is true. Closes: OSPRH-28478 Signed-off-by: Harald Jensås --- .../proc_adopting-the-networking-service.adoc | 17 +++++++++++++++++ ...ing-the-bare-metal-provisioning-service.adoc | 1 + tests/roles/neutron_adoption/defaults/main.yaml | 8 ++++++++ tests/roles/neutron_adoption/tasks/main.yaml | 7 +++++++ 4 files changed, 33 insertions(+) diff --git a/docs_user/modules/proc_adopting-the-networking-service.adoc b/docs_user/modules/proc_adopting-the-networking-service.adoc index 4dd731f37..f8803e2f5 100644 --- a/docs_user/modules/proc_adopting-the-networking-service.adoc +++ b/docs_user/modules/proc_adopting-the-networking-service.adoc @@ -75,6 +75,23 @@ $ oc patch openstackcontrolplane openstack --type=merge --patch ' ' ---- ==== ++ +[NOTE] +==== +If you are adopting the {bare_metal_first_ref}, you must configure the ML2 mechanism drivers to include both `ovn` and `baremetal`: + +[source,shell] +---- +$ oc patch openstackcontrolplane openstack --type=merge --patch ' +spec: + neutron: + template: + ml2MechanismDrivers: + - ovn + - baremetal +' +---- +==== .Verification diff --git a/docs_user/modules/proc_deploying-the-bare-metal-provisioning-service.adoc b/docs_user/modules/proc_deploying-the-bare-metal-provisioning-service.adoc index ec574fad4..d6b1d8214 100644 --- a/docs_user/modules/proc_deploying-the-bare-metal-provisioning-service.adoc +++ b/docs_user/modules/proc_deploying-the-bare-metal-provisioning-service.adoc @@ -20,6 +20,7 @@ $ oc get openstackcontrolplanes.core.openstack.org -o jsonpath='{.spec.ir + ** Replace `` with the name of your existing `OpenStackControlPlane` CR, for example, `openstack-control-plane`. * The {identity_service_first_ref}, {networking_first_ref}, and {image_service_first_ref} are operational. +* The {networking_service} is configured with the ML2 baremetal mechanism driver. For more information, see xref:adopting-the-networking-service_adopt-control-plane[Adopting the {networking_service}]. + [NOTE] If you use the {bare_metal} in a Bare Metal as a Service configuration, do not adopt the {compute_service_first_ref} before you adopt the {bare_metal}. diff --git a/tests/roles/neutron_adoption/defaults/main.yaml b/tests/roles/neutron_adoption/defaults/main.yaml index de91f6db7..dbbe0bb1d 100644 --- a/tests/roles/neutron_adoption/defaults/main.yaml +++ b/tests/roles/neutron_adoption/defaults/main.yaml @@ -30,3 +30,11 @@ neutron_config_patch: | networkAttachments: - internalapi neutron_retry_delay: 5 + +ironic_ml2_baremetal_patch: + spec: + neutron: + template: + ml2MechanismDrivers: + - ovn + - baremetal diff --git a/tests/roles/neutron_adoption/tasks/main.yaml b/tests/roles/neutron_adoption/tasks/main.yaml index e1e11f077..df53d959f 100644 --- a/tests/roles/neutron_adoption/tasks/main.yaml +++ b/tests/roles/neutron_adoption/tasks/main.yaml @@ -4,6 +4,13 @@ {{ oc_header }} oc patch openstackcontrolplane openstack --type=merge --patch '{{ neutron_config_patch }}' +- name: Patch neutron ml2MechanismDrivers to inlcude ml2 baremetal + when: ironic_adoption|bool + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc patch openstackcontrolplane openstack --type=merge --patch '{{ ironic_ml2_baremetal_patch }}' + - name: wait for Neutron to start up ansible.builtin.shell: | {{ shell_header }} From 0b5d995f423cba928764ef091eac26f51f857c8a Mon Sep 17 00:00:00 2001 From: Harald Date: Wed, 1 Apr 2026 16:39:01 +0200 Subject: [PATCH 2/2] Update docs_user/modules/proc_adopting-the-networking-service.adoc Co-authored-by: Katie Gilligan --- docs_user/modules/proc_adopting-the-networking-service.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_user/modules/proc_adopting-the-networking-service.adoc b/docs_user/modules/proc_adopting-the-networking-service.adoc index f8803e2f5..714f1dc62 100644 --- a/docs_user/modules/proc_adopting-the-networking-service.adoc +++ b/docs_user/modules/proc_adopting-the-networking-service.adoc @@ -74,8 +74,8 @@ $ oc patch openstackcontrolplane openstack --type=merge --patch ' dhcp_agent_notification = True ' ---- -==== + +==== [NOTE] ==== If you are adopting the {bare_metal_first_ref}, you must configure the ML2 mechanism drivers to include both `ovn` and `baremetal`: