-
Task
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
False
-
-
False
-
-
rhel-9
-
None
-
-
This task is tracking the test case writing activities to cover the bug described below.
A port might be reported up, or ovn-installed written in OVS DB too early i.e. before all flows related to that port have been installed.
This typically can happen for the first port of a datapath when conditional monitoring is enabled.
The following test fails and shows that some flows are not yet installed while ovn-installed is already written in OVS db.
AT_SETUP([ovn-installed]) ovn_start net_add n1 sim_add hv1 as hv1 ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.1 ovn-appctl vlog/set dbg ovs-vsctl add-port br-int vif1 -- \ set Interface vif1 external-ids:iface-id=lsp1 check ovn-nbctl ls-add ls1 sleep_controller hv1 check ovn-nbctl --wait=sb lsp-add ls1 lsp1 -- \ lsp-set-addresses lsp1 "f0:00:00:00:00:01 10.0.0.1" sleep_sb wake_up_controller hv1 # Wait for pflow for lsp1 OVS_WAIT_UNTIL([ ofport=$(as hv1 ovs-vsctl --bare --columns ofport find Interface name=vif1) echo "vif1 port=$ofport" test -n "$ofport" && test 1 -le $(as hv1 ovs-ofctl dump-flows br-int | grep -c in_port=$ofport") ]) # if ovn-installed in ovs, all flows should be installed. # In that case, there should be at least one flow with lsp1 address. OVS_WAIT_UNTIL([ ovn_installed=$(as hv1 ovs-vsctl get Interface vif1 external_ids:ovn-installed) flow_count=$(as hv1 ovs-ofctl dump-flows br-int | grep -Fc "10.0.0.1") echo "installed=$ovn_installed, count=$flow_count" if test -n "$ovn_installed"; then test $flow_count -ge 1 else true fi ]) wake_up_sb wait_for_ports_up OVN_CLEANUP([hv1]) AT_CLEANUP ])