summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2022-03-24 12:20:25 +0100
committerIlya Maximets <i.maximets@ovn.org>2022-03-25 20:31:31 +0100
commit5d8e080115fbc666888efe9776619c1b4d1e9517 (patch)
tree3061f3c8fe24d3eac266e71f90f47d89f5692ac5
parent67baf6c5add09e126dbf4249509dbe69c25560fe (diff)
downloadopenvswitch-5d8e080115fbc666888efe9776619c1b4d1e9517.tar.gz
system-traffic.at: Fix flaky DNAT load balancing test.
'conntrack - DNAT load balancing' test fails from time to time because not all the group buckets are getting hit. In short, the test creates a group with 3 buckets with the same weight. It creates 12 TCP sessions and expects that each bucket will be used at least once. However, there is a solid chance that this will not happen. The probability of having at least one empty bucket is: C(3, 1) x (2/3)^N - C(3, 2) x (1/3)^N Where N is the number of distinct TCP sessions. For N=12, the probability is about 0.023, i.e. there is a 2.3% chance for a test to fail, which is not great for CI. Increasing the number of sessions to 50 to reduce the probability of failure down to 4.7e-9. In my testing, the configuration with 50 TCP sessions didn't fail after 6000 runs. Should be good enough for CI systems. Fixes: 2c66ebe47a88 ("ofp-actions: Allow conntrack action in group buckets.") Acked-by: Eelco Chaudron <echaudro@redhat.com> Acked-by: Michael Phelan <michael.phelan@intel.com> Acked-by: Paolo Valerio <pvalerio@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--tests/system-traffic.at2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/system-traffic.at b/tests/system-traffic.at
index ea994a40d..66e6d6318 100644
--- a/tests/system-traffic.at
+++ b/tests/system-traffic.at
@@ -5918,7 +5918,7 @@ on_exit 'ovs-appctl revalidator/purge'
on_exit 'ovs-appctl dpif/dump-flows br0'
dnl Should work with the virtual IP address through NAT
-for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
+for i in $(seq 1 50); do
echo Request $i
NS_CHECK_EXEC([at_ns1], [wget 10.1.1.64 -t 5 -T 1 --retry-connrefused -v -o wget$i.log])
done