diff options
| -rw-r--r-- | docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh | 7 | ||||
| -rw-r--r-- | releasenotes/notes/bug-1999778.yaml | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh b/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh index c91f87172..6fada1031 100644 --- a/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh +++ b/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh @@ -1,16 +1,15 @@ #!/bin/bash +set -o errexit bridge=$1 port=$2 -ip link show $port -if [[ $? -ne 0 ]]; then +if ! ip link show $port; then # fail when device doesn't exist exit 1 fi -ovs-vsctl br-exists $bridge -if [[ $? -eq 2 ]]; then +ovs-vsctl br-exists $bridge || if [[ $? -eq 2 ]]; then changed=changed ovs-vsctl --no-wait add-br $bridge fi diff --git a/releasenotes/notes/bug-1999778.yaml b/releasenotes/notes/bug-1999778.yaml new file mode 100644 index 000000000..bb45d0082 --- /dev/null +++ b/releasenotes/notes/bug-1999778.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes an issue where the script ``kolla_ensure_openvswitch_configured`` in + the ``openvswitch-db-server`` image would ignore errors encountered while + configuring bridges and ports. + `LP#1999778 <https://launchpad.net/bugs/1999778>`__ |
