Some tests were adding SB chassis entries to test out Service
Monitors, those tests could end up with the following warning:

physical|WARN|Failed to locate tunnel to reach main chassis hv2 for port be0.

Make sure the tunnel port is created and valid before attempting
to bind the port to the newly created chassis.

Fixes: 3c488ba9a2f4 ("northd: Emit per-backend Advertised_Route for LB 
redistribution.")
Fixes: 4bba54f5d5f8 ("controller: Skip LB route install when Service_Monitor is 
offline.")
Signed-off-by: Ales Musil <[email protected]>
---
 tests/system-ovn.at | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index 3f43132cc..2b8e2b09e 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -22993,6 +22993,12 @@ OVS_WAIT_UNTIL([
     test "$route_recompute_ct" -ne 0
 ])
 check ovn-sbctl chassis-add hv2 geneve 169.0.0.2
+OVS_WAIT_UNTIL([
+    tunnel_ofport=$(ovs-vsctl --bare --columns=ofport find Interface \
+                    options:local_ip=169.0.0.1 options:remote_ip=169.0.0.2)
+    test -n "$tunnel_ofport" && test "$tunnel_ofport" -ge 0
+])
+check ovn-nbctl --wait=hv sync
 hv2=$(fetch_column Chassis _uuid name=hv2)
 check ovn-sbctl set Port_Binding be0 chassis=$hv2
 wait_row_count Service_Monitor 1 logical_port=be0 status=offline
@@ -23849,6 +23855,12 @@ OVS_WAIT_UNTIL([
 check ovs-vsctl set Interface ovs-be0 external_ids:iface-id="not-be0"
 wait_column "" Port_Binding chassis logical_port=be0
 check ovn-sbctl chassis-add hv2 geneve 169.0.0.2
+OVS_WAIT_UNTIL([
+    tunnel_ofport=$(ovs-vsctl --bare --columns=ofport find Interface \
+                    options:local_ip=169.0.0.1 options:remote_ip=169.0.0.2)
+    test -n "$tunnel_ofport" && test "$tunnel_ofport" -ge 0
+])
+check ovn-nbctl --wait=hv sync
 hv2=$(fetch_column Chassis _uuid name=hv2)
 check ovn-sbctl set Port_Binding be0 chassis=$hv2
 
@@ -23876,6 +23888,12 @@ check ovn-nbctl --wait=hv set Logical_Router_Port 
lr-origin-share \
 check ovs-vsctl set Interface ovs-be0 external_ids:iface-id="not-be0"
 wait_column "" Port_Binding chassis logical_port=be0
 check ovn-sbctl chassis-add hv2 geneve 169.0.0.2
+OVS_WAIT_UNTIL([
+    tunnel_ofport=$(ovs-vsctl --bare --columns=ofport find Interface \
+                    options:local_ip=169.0.0.1 options:remote_ip=169.0.0.2)
+    test -n "$tunnel_ofport" && test "$tunnel_ofport" -ge 0
+])
+check ovn-nbctl --wait=hv sync
 hv2=$(fetch_column Chassis _uuid name=hv2)
 check ovn-sbctl set Port_Binding be0 chassis=$hv2
 
-- 
2.55.0

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

Reply via email to