test(iperf): install iptables rule inside of container (#9880)

In Docker environments, applying iptables rules to filter
container-container traffic on the Docker bridged network is not
reliable, leading to direct connections being established in our relayed
tests. To fix this, we insert the rules directly from the client
container itself.

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
This commit is contained in:
Thomas Eizinger
2025-07-16 18:29:33 +08:00
committed by GitHub
parent 2fd56fb7ae
commit cf2470ba1e
5 changed files with 31 additions and 10 deletions

View File

@@ -147,7 +147,11 @@ jobs:
- name: Ensure Client emitted no warnings
if: "!cancelled()"
run: docker compose logs client | grep "WARN" && exit 1 || exit 0
# Remove the error filter once headless-client 1.5.2 is released.
run: |
docker compose logs client | \
grep "Operation not permitted (os error 1)" --invert | \
grep "WARN" && exit 1 || exit 0
- name: Show Client logs
if: "!cancelled()"
run: docker compose logs client

View File

@@ -107,6 +107,9 @@ jobs:
if grep -q '^website/' changed_files.txt; then
jobs="${jobs},codeql"
fi
if grep -q '^scripts/tests/' changed_files.txt; then
jobs="${jobs},build-artifacts,build-perf-artifacts"
fi
echo "jobs_to_run=$jobs" >> "$GITHUB_OUTPUT"
@@ -311,7 +314,7 @@ jobs:
run: |
# We need to increase the log level to make sure that they don't hold off storm of packets
# generated by UDP tests. Wire is especially chatty.
sed -i 's/^\(\s*\)RUST_LOG:.*$/\1RUST_LOG: wire=error,info/' docker-compose.yml
sed -i 's/^\(\s*\)RUST_LOG:.*$/\1RUST_LOG: wire=error,opentelemetry_sdk=error,info/' docker-compose.yml
grep RUST_LOG docker-compose.yml
# Start services in the same order each time for the tests