Check in ovn system test BFD routes are properly announced by
ovn-controller according to the route state.

Signed-off-by: Lorenzo Bianconi <[email protected]>
---
 tests/system-ovn.at | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index 4737a804b..5f67b6997 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -7356,6 +7356,9 @@ check ovn-nbctl clear logical_router_static_route 
$route_uuid bfd
 check ovn-nbctl lr-policy-del R1
 check ovn-nbctl clear logical_router_port rp-public gateway_chassis
 check ovn-nbctl set logical_router R1 options:chassis=hv1
+# enable route announcing
+check ovn-nbctl set logical_router R1 options:dynamic-routing=true
+check ovn-nbctl set Logical_Router_Port rp-public 
options:dynamic-routing-redistribute="connected,static"
 check ovn-nbctl set logical_router_static_route $route_uuid bfd=$uuid
 
 # restart bfdd
@@ -7367,6 +7370,7 @@ Allowing connections from 172.16.1.1
 
 wait_column "up" nb:bfd status logical_port=rp-public
 OVS_WAIT_UNTIL([ovn-sbctl dump-flows R1 |grep lr_in_ip_routing |grep 'ip4.dst 
== 100.0.0.0/8' |grep -q 172.16.1.50])
+check_row_count Advertised_Route 1 ip_prefix=100.0.0.0/8
 
 check ovn-nbctl clear logical_router_static_route $route_uuid bfd
 wait_column "admin_down" nb:bfd status logical_port=rp-public
@@ -7384,10 +7388,14 @@ wait_column "admin_down" nb:bfd status 
logical_port=rp-public
 OVS_WAIT_UNTIL([ip netns exec server bfdd-control status | grep -qi 
state=Down])
 uuid=$(fetch_column nb:bfd _uuid logical_port="rp-public")
 
+check ovn-nbctl set logical_router_static_route $route_uuid bfd=$uuid
+wait_column "up" nb:bfd status logical_port=rp-public
 # stop bfd endpoint
 NS_CHECK_EXEC([server], [bfdd-control stop], [0], [dnl
 stopping
 ])
+wait_column "down" nb:bfd status logical_port=rp-public
+check_row_count Advertised_Route 0 ip_prefix=100.0.0.0/8
 
 # remove bfd entry
 check ovn-nbctl destroy bfd $uuid
-- 
2.51.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to