After the commit 0c1bde1c4a the recompute counters are more predictable,
so we changed the LSP incremental processing test to not tolerate any
failures (instead of 50% successful rate). But the test would then fail
occasionally at the first check, because sometimes the update of the
initial configurations from ovn-controller such as for tunnel interface
creation come too late, after we cleaned the stats counters and start
the LSP tests.

This patch fixes it by creating a pilot port and wait for it to be up,
so that we know the initial ovn-controller configurations are done, and
will not interfere with our I-P tests.

Fixes: 0c1bde1c4a47 ("ovn-northd: Avoid recompute caused by in-flight 
transactions.")
Signed-off-by: Han Zhou <[email protected]>
---
 tests/ovn-northd.at | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index e79d33b2aec5..3e06f14c9437 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -9532,6 +9532,13 @@ check_recompute_counter() {
 
 check ovn-nbctl --wait=hv ls-add ls0
 
+# Create a pilot port and wait it up to make sure we are ready for the real
+# tests, so that the counters measured are accurate.
+check ovn-nbctl --wait=hv lsp-add ls0 lsp-pilot -- lsp-set-addresses lsp-pilot 
"unknown"
+ovs-vsctl add-port br-int lsp-pilot -- set interface lsp-pilot 
external_ids:iface-id=lsp-pilot
+wait_for_ports_up
+check ovn-nbctl --wait=hv sync
+
 check as northd ovn-appctl -t NORTHD_TYPE inc-engine/clear-stats
 check ovn-nbctl --wait=hv lsp-add ls0 lsp0-0 -- lsp-set-addresses lsp0-0 
"unknown"
 ovs-vsctl add-port br-int lsp0-0 -- set interface lsp0-0 
external_ids:iface-id=lsp0-0
-- 
2.31.1

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

Reply via email to