From c66a2cd63bd87b7052e4b76595e5e0a5f807eabd Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Mon, 5 Feb 2024 19:40:49 +0100 Subject: [PATCH] openvswitch: Drop ovs_ensure_configured.sh Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/901695 Change-Id: I9c723b666897883bf5b3343fe92e06aaa0c89d81 --- .../openvswitch-db-server/Dockerfile.j2 | 4 +--- .../ovs_ensure_configured.sh | 22 ------------------- ...vs-ensure-configured-7973d36969e157fa.yaml | 5 +++++ 3 files changed, 6 insertions(+), 25 deletions(-) delete mode 100644 docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh create mode 100644 docker/openvswitch/openvswitch-db-server/releasenotes/notes/drop-ovs-ensure-configured-7973d36969e157fa.yaml diff --git a/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 b/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 index b82a18d20e..f04cd71ecd 100644 --- a/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 +++ b/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 @@ -5,10 +5,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block openvswitch_db_server_header %}{% endblock %} -COPY ovs_ensure_configured.sh /usr/local/bin/kolla_ensure_openvswitch_configured COPY extend_start.sh /usr/local/bin/kolla_openvswitch_extend_start -RUN chmod 755 /usr/local/bin/kolla_ensure_openvswitch_configured \ - /usr/local/bin/kolla_openvswitch_extend_start +RUN chmod 755 /usr/local/bin/kolla_openvswitch_extend_start {% block openvswitch_db_server_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh b/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh deleted file mode 100644 index 6fada1031f..0000000000 --- a/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -set -o errexit - -bridge=$1 -port=$2 - -if ! ip link show $port; then - # fail when device doesn't exist - exit 1 -fi - -ovs-vsctl br-exists $bridge || if [[ $? -eq 2 ]]; then - changed=changed - ovs-vsctl --no-wait add-br $bridge -fi - -if [[ ! $(ovs-vsctl list-ports $bridge) =~ $(echo "\<$port\>") ]]; then - changed=changed - ovs-vsctl --no-wait add-port $bridge $port -fi - -echo $changed diff --git a/docker/openvswitch/openvswitch-db-server/releasenotes/notes/drop-ovs-ensure-configured-7973d36969e157fa.yaml b/docker/openvswitch/openvswitch-db-server/releasenotes/notes/drop-ovs-ensure-configured-7973d36969e157fa.yaml new file mode 100644 index 0000000000..cc8daf1f49 --- /dev/null +++ b/docker/openvswitch/openvswitch-db-server/releasenotes/notes/drop-ovs-ensure-configured-7973d36969e157fa.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + ``openvswitch`` script ``ovs_ensure_configured.sh`` has been dropped after + being replaced with Ansible modules in ``kolla-ansible``.