GitHub runners use 10.1.0.0/16 network as their base network for eth0
interface.  That is causing random system test failures when unexpected
conntrack entries for this network are present, because our system
tests are mainly using 10.1.1.0/24 subnet for their test networks.

Run system tests in their own network namespace to avoid any unwanted
interference.

Ideally, we would run every single test in its own namespace, but that
is not a trivial change and will likely be hard to backport.  Still
worth investigating in the future.

Note: Layer3 tunnel tests with Bareudp ports rely on loopback to work,
but lo interface is down by default in new namespaces.  So, bringing
it up.  These tests are skipped in Ubuntu 22.04, because it doesn't
have bareudp support, but it's better to have the change anyway, so it
doesn't bite us in the future while upgrading the base image.

Signed-off-by: Ilya Maximets <[email protected]>
---
 .ci/linux-build.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 7c2aebad8..bf9d6241d 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -157,6 +157,10 @@ else
         if [ "$testsuite" != "check" ] && \
            [ "$testsuite" != "check-ovsdb-cluster" ] ; then
             run_as_root="sudo -E PATH=$PATH GITHUB_ACTIONS=$GITHUB_ACTIONS"
+            sudo ip netns add ovs-system-test-ns
+            # Some system tests may rely on traffic loopback.
+            sudo ip -netns ovs-system-test-ns link set dev lo up
+            run_as_root="${run_as_root} ip netns exec ovs-system-test-ns"
         fi
         if [ "${testsuite##*dpdk}" != "$testsuite" ]; then
             sudo sh -c 'echo 1024 > /proc/sys/vm/nr_hugepages' || true
-- 
2.43.0

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

Reply via email to