Skip to content

Commit 89285db

Browse files
emyopenshift-cherrypick-robot
authored andcommitted
add: fallback check for br-ex-br in ofport NM dispatcher script
1 parent 4252ec6 commit 89285db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

templates/common/_base/files/ofport-request.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,13 @@ contents:
5959
fi
6060
6161
# Get the bridge name
62-
BRIDGE_NAME=$(nmcli -t -f connection.interface-name conn show "${BRIDGE_ID}" | awk -F ':' '{print $NF}')
62+
BRIDGE_NAME=$(nmcli -t -f connection.interface-name conn show "${BRIDGE_ID}" | awk -F ':' '{print $NF}') || true
6363
# Limit this to br-ex and br-ex1 only. If one wanted to enable this for all OVS bridges,
6464
# the condition would be: if [ "$BRIDGE_NAME" == "" ]; then
65+
# OCPBUGS-54682: If the condition is not met the first time it will check for br-ex-br to see if there is a K-NMS managed br-ex.
66+
if [ "${BRIDGE_NAME}" != "br-ex" ] && [ "${BRIDGE_NAME}" != "br-ex1" ]; then
67+
BRIDGE_NAME=$(nmcli -t -f connection.interface-name conn show "br-ex-br" | awk -F ':' '{print $NF}')
68+
fi
6569
if [ "${BRIDGE_NAME}" != "br-ex" ] && [ "${BRIDGE_NAME}" != "br-ex1" ]; then
6670
exit 0
6771
fi

0 commit comments

Comments
 (0)