@@ -200,6 +200,7 @@ def setUp(self):
200
200
nodeSelector: kubernetes.io/hostname == 'kind-control-plane'
201
201
peerIP: %s
202
202
asNumber: 63000
203
+ nextHopMode: Keep
203
204
filters:
204
205
- export-child-cluster-cidr
205
206
EOF
@@ -447,7 +448,6 @@ def test_local_bgp_peers(self):
447
448
"""
448
449
Runs the tests for local bgp peers
449
450
"""
450
-
451
451
# stop_for_debug()
452
452
453
453
# Assert bgp sessions has been established to the following local workloads.
@@ -493,16 +493,18 @@ def test_local_bgp_peers(self):
493
493
494
494
if self .topology == TopologyMode .RR :
495
495
# Check that the ToR hears about all the routes from master node.
496
- # 10.123.3.0/26 via 172.18.0.3 on eth0 [RR_with_master_node 14:48:19] * (100/0) [AS65401i]
497
- # 10.123.0.0/26 via 172.18.0.3 on eth0 [RR_with_master_node 14:48:18] * (100/0) [AS65401i]
498
- # 10.123.1.0/26 via 172.18.0.3 on eth0 [RR_with_master_node 14:48:19] * (100/0) [AS65401i]
496
+ # Note that `nextHopMode: Keep` is specified for `rr-tor-peer`, ToR sees routes with original next hop.
497
+ # 10.123.3.0/26 via 172.18.0.5 on eth0 [RR_with_master_node 09:46:12 from 172.18.0.3] * (100/0) [AS65401i]
498
+ # 10.123.0.0/26 via 172.18.0.2 on eth0 [RR_with_master_node 09:46:10 from 172.18.0.3] * (100/0) [AS65401i]
499
+ # 10.123.1.0/26 via 172.18.0.5 on eth0 [RR_with_master_node 09:46:12 from 172.18.0.3] * (100/0) [AS65401i]
499
500
output = run ("docker exec kind-node-tor birdcl show route" )
500
- self .assertRegexpMatches (output , "10\.123\.0\.0/26.*via %s on .*RR_with_master_node.*AS65401" % (self .ips [0 ],))
501
- self .assertRegexpMatches (output , "10\.123\.1\.0/26.*via %s on .*RR_with_master_node.*AS65401" % (self .ips [0 ],))
502
- self .assertRegexpMatches (output , "10\.123\.3\.0/26.*via %s on .*RR_with_master_node.*AS65401" % (self .ips [0 ],))
501
+ self .assertRegexpMatches (output , "10\.123\.0\.0/26.*via %s on .*RR_with_master_node.*AS65401" % (self .ips [1 ],))
502
+ self .assertRegexpMatches (output , "10\.123\.1\.0/26.*via %s on .*RR_with_master_node.*AS65401" % (self .ips [2 ],))
503
+ self .assertRegexpMatches (output , "10\.123\.3\.0/26.*via %s on .*RR_with_master_node.*AS65401" % (self .ips [2 ],))
503
504
504
505
# Check connectivity from ToR to workload.
505
506
self .red_pod_0_0 .execute ("ip addr add 10.123.0.1 dev lo" )
507
+ stop_for_debug ()
506
508
507
509
output = run ("docker exec kind-node-tor ping -c3 10.123.0.1" )
508
510
self .assertRegexpMatches (output , "3 packets transmitted, 3 packets received" )
@@ -527,7 +529,6 @@ def setUp(self):
527
529
self .set_topology (TopologyMode .RR )
528
530
super (TestLocalBGPPeerRR , self ).setUp ()
529
531
530
-
531
532
class TestLocalBGPPeerMesh (_TestLocalBGPPeer ):
532
533
533
534
# In the tests of this class we have BGP peers between the
0 commit comments