relay non-zero exit codes when creating openvswitch bridges
Calls to `ovs-vsctl` in `ovs_ensure_configured.sh` did not get checked
for errors.
This can cause false success statuses when
the script is run by automation tools such as ansible.
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/870540
Closes-bug: #1999778
Change-Id: Iad83132b61efadbf09aa9aa2edf96235085764c6
(cherry picked from commit a840ac0d7c
)
changes/66/870666/1
parent
00e50f58ae
commit
0c0e3d275d
|
@ -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
|
||||
|
|
|
@ -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>`__
|
Loading…
Reference in New Issue