Skip to content

Commit 19f39c2

Browse files
committed
Change BGP e2e lane config
Change configuration in preparation for running all control plane tests: * Make both dualstack, not much value testing IPv4 single stack * Make one of the lanes noSnatGW to get signal from that as well * Enable multicast and empty LB events * Configure host to be able to route to networks from the external world * Ensure frr container is not able to route through the host/runner Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
1 parent b5bc88d commit 19f39c2

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,15 +464,15 @@ jobs:
464464
- {"target": "network-segmentation", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"}
465465
- {"target": "network-segmentation", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"}
466466
- {"target": "bgp", "ha": "noHA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "routeadvertisements": "advertise-default", "network-segmentation": "enable-network-segmentation"}
467-
- {"target": "bgp", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "routeadvertisements": "advertise-default", "network-segmentation": "enable-network-segmentation"}
467+
- {"target": "bgp", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "dualstack", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "routeadvertisements": "advertise-default", "network-segmentation": "enable-network-segmentation"}
468468
- {"target": "traffic-flow-test-only","ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "traffic-flow-tests": "1-24", "network-segmentation": "enable-network-segmentation"}
469469
- {"target": "tools", "ha": "noHA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "network-segmentation": "enable-network-segmentation"}
470470
needs: [ build-pr ]
471471
env:
472472
JOB_NAME: "${{ matrix.target }}-${{ matrix.ha }}-${{ matrix.gateway-mode }}-${{ matrix.ipfamily }}-${{ matrix.disable-snat-multiple-gws }}-${{ matrix.second-bridge }}-${{ matrix.ic }}"
473473
OVN_HYBRID_OVERLAY_ENABLE: ${{ (matrix.target == 'control-plane' || matrix.target == 'control-plane-helm') && (matrix.ipfamily == 'ipv4' || matrix.ipfamily == 'dualstack' ) }}
474-
OVN_MULTICAST_ENABLE: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'network-segmentation' }}"
475-
OVN_EMPTY_LB_EVENTS: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' }}"
474+
OVN_MULTICAST_ENABLE: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'network-segmentation' || matrix.target == 'bgp' }}"
475+
OVN_EMPTY_LB_EVENTS: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'bgp' }}"
476476
OVN_HA: "${{ matrix.ha == 'HA' }}"
477477
OVN_DISABLE_SNAT_MULTIPLE_GWS: "${{ matrix.disable-snat-multiple-gws == 'noSnatGW' }}"
478478
KIND_INSTALL_METALLB: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'network-segmentation' }}"
@@ -559,7 +559,7 @@ jobs:
559559
echo OVN_TEST_EX_GW_NETWORK=xgw >> $GITHUB_ENV
560560
echo OVN_ENABLE_EX_GW_NETWORK_BRIDGE=true >> $GITHUB_ENV
561561
fi
562-
if [[ "$JOB_NAME" == *"shard-conformance"* ]] && [ "$ADVERTISE_DEFAULT_NETWORK" == "true" ]; then
562+
if [ "$ADVERTISE_DEFAULT_NETWORK" == "true" ]; then
563563
echo "ADVERTISE_DEFAULT_NETWORK=true" >> $GITHUB_ENV
564564
565565
# Use proper variable declaration with default values

contrib/kind-common

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,13 @@ deploy_bgp_external_server() {
751751
echo "FRR kind network IPv6: ${bgp_network_frr_v6}"
752752
$OCI_BIN exec bgpserver ip -6 route replace default via "$bgp_network_frr_v6"
753753
fi
754+
# disable the default route to make sure the container only routes accross
755+
# directly connected or learnt networks (doing this at the very end since
756+
# docker changes the routing table when a new network is connected)
757+
docker exec frr ip route delete default
758+
docker exec frr ip route
759+
docker exec frr ip -6 route delete default
760+
docker exec frr ip -6 route
754761
}
755762

756763
destroy_bgp() {
@@ -817,7 +824,7 @@ EOF
817824

818825
rm -rf "${FRR_TMP_DIR}"
819826
# Add routes for pod networks dynamically into the github runner for return traffic to pass back
820-
if [ -n "${JOB_NAME:-}" ] && [[ "$JOB_NAME" == *"shard-conformance"* ]] && [ "$ADVERTISE_DEFAULT_NETWORK" == "true" ]; then
827+
if [ "$ADVERTISE_DEFAULT_NETWORK" = "true" ]; then
821828
echo "Adding routes for Kubernetes pod networks..."
822829
NODES=$(kubectl get nodes -o jsonpath='{.items[*].metadata.name}')
823830
echo "Found nodes: $NODES"
@@ -835,7 +842,7 @@ EOF
835842
# Add IPv4 route
836843
if [ -n "$ipv4_subnet" ] && [ -n "$node_ipv4" ]; then
837844
echo "Adding IPv4 route for $node ($node_ipv4): $ipv4_subnet"
838-
sudo ip route add $ipv4_subnet via $node_ipv4
845+
sudo ip route replace $ipv4_subnet via $node_ipv4
839846
fi
840847
fi
841848

@@ -847,7 +854,7 @@ EOF
847854

848855
if [ -n "$ipv6_subnet" ] && [ -n "$node_ipv6" ]; then
849856
echo "Adding IPv6 route for $node ($node_ipv6): $ipv6_subnet"
850-
sudo ip -6 route add $ipv6_subnet via $node_ipv6
857+
sudo ip -6 route replace $ipv6_subnet via $node_ipv6
851858
fi
852859
fi
853860
done

0 commit comments

Comments
 (0)