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
This commit is contained in:
@@ -38,6 +38,7 @@ smoke: docker smoke-down
|
|||||||
@echo "picoquic up on $(SMOKE_PICOQUIC):4433 (in $(SMOKE_NET))"
|
@echo "picoquic up on $(SMOKE_PICOQUIC):4433 (in $(SMOKE_NET))"
|
||||||
docker run --rm --name $(SMOKE_CLIENT) \
|
docker run --rm --name $(SMOKE_CLIENT) \
|
||||||
--network $(SMOKE_NET) \
|
--network $(SMOKE_NET) \
|
||||||
|
-e SMOKE_MODE=1 \
|
||||||
-e ROLE=client \
|
-e ROLE=client \
|
||||||
-e TESTCASE=handshake \
|
-e TESTCASE=handshake \
|
||||||
-e REQUESTS="https://$(SMOKE_PICOQUIC):4433/" \
|
-e REQUESTS="https://$(SMOKE_PICOQUIC):4433/" \
|
||||||
|
|||||||
@@ -2,15 +2,19 @@
|
|||||||
# quic-interop-runner endpoint entry point.
|
# quic-interop-runner endpoint entry point.
|
||||||
#
|
#
|
||||||
# The base image (martenseemann/quic-network-simulator-endpoint) provides
|
# The base image (martenseemann/quic-network-simulator-endpoint) provides
|
||||||
# /setup.sh, which configures routing for the runner's ns-3 sim. We try
|
# /setup.sh, which configures routing for the runner's ns-3 sim. We source
|
||||||
# to source it but tolerate failure so smoke tests outside the runner
|
# it inside the runner — but for `make smoke` runs against a plain Docker
|
||||||
# (without --privileged / the sim's network) still launch the JVM client.
|
# bridge network, sourcing /setup.sh succeeds AND breaks DNS resolution
|
||||||
# Inside the runner, /setup.sh succeeds because the runner provides the
|
# (it points the resolver at the sim's nameserver which doesn't exist
|
||||||
# necessary capabilities.
|
# in smoke mode). Set SMOKE_MODE=1 to skip /setup.sh entirely.
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
|
|
||||||
# shellcheck disable=SC1091
|
if [ "${SMOKE_MODE:-0}" = "1" ]; then
|
||||||
source /setup.sh 2>/dev/null || echo "(setup.sh skipped — running outside the runner sim)" >&2
|
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
|
set -e
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user