From ff5353e7339d75384df657da31b3b130ccb5a40a Mon Sep 17 00:00:00 2001 From: Yatin Karel Date: Wed, 20 Aug 2025 15:58:12 +0530 Subject: [PATCH] [CI] Use ovs-vsctl to ensure bridges The upstream openvswitch collection has been deprecated and was not included in newer Ansible (like Ansible 11). Since jobs switched to Ansible jobs relying on these tasks are failing. This patch switches to use ovs bridge command same as add-port in next tasks. Also add the role to irrelevant-files as single node jobs need not run on multi node role changes. Also fixed pre-commit error by switching to fix-byte-order-marker. Change-Id: Ie3a40efed5e132aee53dce3db6522c551897b5f7 Signed-off-by: Yatin Karel --- .pre-commit-config.yaml | 2 +- roles/multi-node-setup/tasks/main.yaml | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b73313a..6c8ceb3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: rev: v5.0.0 hooks: - id: check-added-large-files - - id: check-byte-order-marker + - id: fix-byte-order-marker - id: check-case-conflict - id: check-executables-have-shebangs - id: check-merge-conflict diff --git a/roles/multi-node-setup/tasks/main.yaml b/roles/multi-node-setup/tasks/main.yaml index fc6bd6b..ee67fda 100644 --- a/roles/multi-node-setup/tasks/main.yaml +++ b/roles/multi-node-setup/tasks/main.yaml @@ -5,17 +5,15 @@ block: - name: Ensure the infra bridge exists become: true - openvswitch_bridge: - bridge: "{{ infra_bridge_name }}" - state: present - fail_mode: standalone + command: >- + ovs-vsctl --may-exist add-br {{ infra_bridge_name }} + -- set-fail-mode {{ infra_bridge_name }} standalone - name: Ensure the Neutron external bridge exists become: true - openvswitch_bridge: - bridge: "{{ neutron_external_bridge_name }}" - state: present - fail_mode: standalone + command: >- + ovs-vsctl --may-exist add-br {{ neutron_external_bridge_name }} + -- set-fail-mode {{ neutron_external_bridge_name }} standalone - name: Create patch port between bridges become: true