Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions templates/common/_base/files/ofport-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ contents:
fi

# Get the port's master. If it doesn't have any, assume it's not our bridge
BRIDGE_ID=$(nmcli -t -f connection.master conn show "${PORT_CONNECTION_UUID}" | awk -F ':' '{print $NF}')
BRIDGE_ID=$(nmcli -t -f general.name conn show "${PORT_CONNECTION_UUID}" | awk -F ':' '{print $NF}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change changes the logic

[root@worker-1 ~]# nmcli -t -f general.name conn show "${PORT_CONNECTION_UUID}" | awk -F ':' '{print $NF}'
ovs-port-phys0
[root@worker-1 ~]# nmcli -t -f connection.master conn show "${PORT_CONNECTION_UUID}" | awk -F ':' '{print $NF}'
br-ex

if [ "${BRIDGE_ID}" == "" ]; then
exit 0
fi

# Get the bridge name
BRIDGE_NAME=$(nmcli -t -f connection.interface-name conn show "${BRIDGE_ID}" | awk -F ':' '{print $NF}')
BRIDGE_NAME=$(nmcli -t -f connection.master conn show "${BRIDGE_ID}" | awk -F ':' '{print $NF}') || true
# Limit this to br-ex and br-ex1 only. If one wanted to enable this for all OVS bridges,
# the condition would be: if [ "$BRIDGE_NAME" == "" ]; then
if [ "${BRIDGE_NAME}" != "br-ex" ] && [ "${BRIDGE_NAME}" != "br-ex1" ]; then
Expand Down