]> tinc-vpn.org Git - tinc/commitdiff
Add workaround for ip netns exec misbehaving in containers
authorGuus Sliepen <guus@tinc-vpn.org>
Mon, 6 Apr 2026 14:28:21 +0000 (16:28 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Mon, 6 Apr 2026 14:28:21 +0000 (16:28 +0200)
.ci/compat/run.sh
.ci/test/prepare.sh
.github/workflows/test.yml

index 83bfedb80da00ca020bb6cfc2985ea96f30abb13..66308c80f4ca18a422288e92f9f0d145cb3b4cd3 100755 (executable)
@@ -139,6 +139,11 @@ tinc11() {
   /opt/tinc11/sbin/tinc -c $etc/tinc11 "$@"
 }
 
+if [ -n "$CI" ]; then
+  # Workaround for ip netns exec messing with /sys mount in containers
+  mount -t sysfs --make-private sysfs $(mktemp -d)
+fi
+
 header 'Creating branches'
 
 for node in $nodes; do
index da0269fc02bc92032ddc8d77fdfd55750af799cc..6dcbeb54a039db1b7b6599cf9091c319b8ebb46a 100755 (executable)
@@ -6,3 +6,8 @@ if [ -n "${HOST:-}" ]; then
   update-binfmts --enable
   rm -f /dev/net/tun
 fi
+
+if [ -n "$CI" ]; then
+  # Workaround for ip netns exec messing with /sys mount in containers
+  mount -t sysfs --make-private sysfs $(mktemp -d)
+fi
index ee25e874ededb398a81c74515054907897d9c503..e737aea4e3363a86d238dc9b1d21af2a690db0f0 100644 (file)
@@ -170,6 +170,9 @@ jobs:
       - name: Install deps
         run: .ci/deps.sh iputils-arping clang libclang-rt-dev
 
+      - name: Prepare the system
+        run: .ci/test/prepare.sh
+
       - name: Sanitize tests with default settings
         run: .ci/sanitizers/run.sh default
         if: always()