From d8e17207b6edc81a3287081727763bf6dc0c7dc0 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 6 May 2026 22:58:59 +0000 Subject: [PATCH] fix(quic-interop): skip /setup.sh in smoke mode (it breaks Docker-bridge DNS) The base image's /setup.sh configures routing for the runner's ns-3 sim *and* points the container's DNS resolver at the sim's nameserver. When we source it inside `make smoke` (which uses a plain Docker bridge network without the sim), DNS resolution for the bridge container names breaks: the JVM client can't resolve `amethyst-quic-interop-smoke-picoquic` and aborts before any QUIC traffic. Adds a SMOKE_MODE=1 env var; run_endpoint.sh skips /setup.sh entirely when it's set. The Makefile smoke target sets it. Inside the runner (unset, default), /setup.sh runs as before. https://claude.ai/code/session_01HcvfQq1ttPV9PkRoJb4nyT --- quic/interop/Makefile | 1 + quic/interop/run_endpoint.sh | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/quic/interop/Makefile b/quic/interop/Makefile index 1eb26eec8..5e7f97ae6 100644 --- a/quic/interop/Makefile +++ b/quic/interop/Makefile @@ -38,6 +38,7 @@ smoke: docker smoke-down @echo "picoquic up on $(SMOKE_PICOQUIC):4433 (in $(SMOKE_NET))" docker run --rm --name $(SMOKE_CLIENT) \ --network $(SMOKE_NET) \ + -e SMOKE_MODE=1 \ -e ROLE=client \ -e TESTCASE=handshake \ -e REQUESTS="https://$(SMOKE_PICOQUIC):4433/" \ diff --git a/quic/interop/run_endpoint.sh b/quic/interop/run_endpoint.sh index 4fc33b9c1..521d52be7 100755 --- a/quic/interop/run_endpoint.sh +++ b/quic/interop/run_endpoint.sh @@ -2,15 +2,19 @@ # quic-interop-runner endpoint entry point. # # The base image (martenseemann/quic-network-simulator-endpoint) provides -# /setup.sh, which configures routing for the runner's ns-3 sim. We try -# to source it but tolerate failure so smoke tests outside the runner -# (without --privileged / the sim's network) still launch the JVM client. -# Inside the runner, /setup.sh succeeds because the runner provides the -# necessary capabilities. +# /setup.sh, which configures routing for the runner's ns-3 sim. We source +# it inside the runner — but for `make smoke` runs against a plain Docker +# bridge network, sourcing /setup.sh succeeds AND breaks DNS resolution +# (it points the resolver at the sim's nameserver which doesn't exist +# in smoke mode). Set SMOKE_MODE=1 to skip /setup.sh entirely. set -uo pipefail -# shellcheck disable=SC1091 -source /setup.sh 2>/dev/null || echo "(setup.sh skipped — running outside the runner sim)" >&2 +if [ "${SMOKE_MODE:-0}" = "1" ]; then + echo "(smoke mode — skipping /setup.sh, using container default networking)" >&2 +else + # shellcheck disable=SC1091 + source /setup.sh 2>/dev/null || echo "(setup.sh skipped — running outside the runner sim)" >&2 +fi set -e