From 59beb40d75d079f50d5afac5e518dd21fea44b08 Mon Sep 17 00:00:00 2001 From: Peng Liu Date: Tue, 6 Jun 2023 15:01:21 +0800 Subject: [PATCH] Remove externalGatewayInterface from configure-ovs.sh Ignore externalGatewayInterface flag in ovn.yaml. Remove br-ex1, if it exists. Signed-off-by: Peng Liu --- packaging/systemd/configure-ovs.sh | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/packaging/systemd/configure-ovs.sh b/packaging/systemd/configure-ovs.sh index 49790a6463..c8331f0e23 100755 --- a/packaging/systemd/configure-ovs.sh +++ b/packaging/systemd/configure-ovs.sh @@ -666,12 +666,6 @@ if [ "$1" == "OVNKubernetes" ]; then else rm -f "${iface_default_hint_file}" fi - externalGatewayInterface=$(get_cni_config "externalGatewayInterface") - if [ "$externalGatewayInterface" != "" ]; then - write_iface_external_hint "${extra_bridge_file}" "${externalGatewayInterface}" - else - rm -f "${extra_bridge_file}" - fi fi # Configures NICs onto OVS bridge "br-ex" # Configuration is either auto-detected or provided through a config file written already in Network Manager @@ -737,16 +731,15 @@ if [ "$1" == "OVNKubernetes" ]; then fi fi convert_to_bridge "$iface" "br-ex" "phys0" "${BRIDGE_METRIC}" - # Check if we need to configure the second bridge - if [ -f "$extra_bridge_file" ] && (! nmcli connection show br-ex1 &> /dev/null || ! nmcli connection show ovs-if-phys1 &> /dev/null); then - interface=$(head -n 1 $extra_bridge_file) - convert_to_bridge "$interface" "br-ex1" "phys1" "${BRIDGE1_METRIC}" - fi - # Check if we need to remove the second bridge - if [ ! -f "$extra_bridge_file" ] && (nmcli connection show br-ex1 &> /dev/null || nmcli connection show ovs-if-phys1 &> /dev/null); then + # Remove the second bridge + if nmcli connection show br-ex1 &> /dev/null || nmcli connection show ovs-if-phys1 &> /dev/null; then update_nm_conn_files br-ex1 phys1 rm_nm_conn_files fi + # Remove the second bridge hint file + if [ -f "$extra_bridge_file" ]; then + rm -f "$extra_bridge_file" + fi # Remove bridges created by openshift-sdn ovs-vsctl --timeout=30 --if-exists del-br br0 # Make sure everything is activated @@ -757,9 +750,6 @@ if [ "$1" == "OVNKubernetes" ]; then fi done < <(nmcli -g NAME c) connections+=(ovs-if-phys0 ovs-if-br-ex) - if [ -f "$extra_bridge_file" ]; then - connections+=(ovs-if-phys1 ovs-if-br-ex1) - fi activate_nm_connections "${connections[@]}" elif [ "$1" == "OpenShiftSDN" ]; then # Revert changes made by /usr/local/bin/configure-ovs.sh during SDN migration.