The test was checking if there was any recompute after all operations.
This proven to be flaky because there might have been "random"
recompute happening in the middle due to the following events:

1) SB becomes read only
2) non_vif_data handler for OVS_interface fails
3) Recompute of non_vif_data is not allowed because SB is read only
4) non_vif_data is marked as cancelled
5) Next engine run will do force recompute of all nodes

To prevent that check specifically for the handler that is supposed
to gracefully handle the interface changes.

Fixes: 603f38da062b ("controller: Remove OvS iface type check in I-P 
processing.")
Signed-off-by: Ales Musil <[email protected]>
---
 tests/ovn-controller.at | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at
index 898981867..f61c8c432 100644
--- a/tests/ovn-controller.at
+++ b/tests/ovn-controller.at
@@ -3308,51 +3308,52 @@ net_add n1
 sim_add hv1
 ovs-vsctl add-br br-phys
 ovn_attach n1 br-phys 192.168.0.20
+ovn-appctl vlog/set inc_proc_eng:dbg
 
 check ovn-nbctl ls-add ls0
 check ovn-nbctl lsp-add ls0 vif
 
-ovn-appctl inc-engine/clear-stats
+m4_define([HANDLER_MESSAGE], [runtime_data, recompute (failed handler for 
input ovs_interface_shadow)])
 
 ovs-vsctl -- add-port br-int vif -- \
     set Interface vif external-ids:iface-id=vif
 wait_row_count Port_Binding 1 logical_port="vif" up=true
+AT_CHECK([test 0 = $(grep -c "HANDLER_MESSAGE" hv1/ovn-controller.log)])
 
 ovs-vsctl del-port br-int vif
 wait_row_count Port_Binding 1 logical_port="vif" up=false
+AT_CHECK([test 0 = $(grep -c "HANDLER_MESSAGE" hv1/ovn-controller.log)])
 
 ovs-vsctl add-port br-int vif -- \
     set Interface vif type=dummy -- \
     set Interface vif external-ids:iface-id=vif
 wait_row_count Port_Binding 1 logical_port="vif" up=true
+AT_CHECK([test 0 = $(grep -c "HANDLER_MESSAGE" hv1/ovn-controller.log)])
 
 ovs-vsctl del-port br-int vif
 wait_row_count Port_Binding 1 logical_port="vif" up=false
+AT_CHECK([test 0 = $(grep -c "HANDLER_MESSAGE" hv1/ovn-controller.log)])
 
 ovs-vsctl add-port br-int vif -- \
     set Interface vif type=geneve -- \
     set Interface vif options:remote_ip=1.1.1.1 external-ids:iface-id=vif
 wait_row_count Port_Binding 1 logical_port="vif" up=true
+AT_CHECK([test 0 = $(grep -c "HANDLER_MESSAGE" hv1/ovn-controller.log)])
 
 ovs-vsctl del-port br-int vif
 wait_row_count Port_Binding 1 logical_port="vif" up=false
+AT_CHECK([test 0 = $(grep -c "HANDLER_MESSAGE" hv1/ovn-controller.log)])
 
 # Make sure that setting iface in two different transaction doesn't
 # cause recompute.
 ovs-vsctl add-port br-int vif
 ovs-vsctl set Interface vif external-ids:iface-id=vif
 wait_row_count Port_Binding 1 logical_port="vif" up=true
+AT_CHECK([test 0 = $(grep -c "HANDLER_MESSAGE" hv1/ovn-controller.log)])
 
 ovs-vsctl del-port br-int vif
 wait_row_count Port_Binding 1 logical_port="vif" up=false
-
-AT_CHECK([ovn-appctl inc-engine/show-stats runtime_data |\
-          sed "s/- compute:\s\+[[0-9]]\+/- compute: ??/"], [0], [dnl
-Node: runtime_data
-- recompute:            0
-- compute: ??
-- cancel:               0
-])
+AT_CHECK([test 0 = $(grep -c "HANDLER_MESSAGE" hv1/ovn-controller.log)])
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
-- 
2.45.2

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

Reply via email to