Skip to content

Commit

Permalink
ci: Run system tests in a separate namespace.
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Eelco Chaudron <[email protected]>
  • Loading branch information
igsilya authored and chaudron committed Jan 22, 2024
1 parent 3eb91a8 commit 432a0b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .ci/linux-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 432a0b9

Please sign in to comment.