You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hermetic containers stall on DNS timeouts instead of failing fast #9633
When a task runs with hermetic: true, Concourse blocks outbound traffic via iptables DROP rules. However, the container still gets a fully populated /etc/resolv.conf. Any process that performs a DNS lookup will send UDP packets that silently hit the DROP rules and wait for the full resolver timeout (typically 5 seconds per attempt × retries × number of nameservers) before the lookup fails.
Root cause: SetupMounts in worker/runtime/cni_network.go always writes a populated resolv.conf regardless of hermeticity. DropContainerTraffic adds the DROP rules only after the container is already configured with nameservers to query.
Steps to Reproduce
docker compose up (with containerd) runtime
Create the following pipeline:
jobs:
- name: hermetic-dns-timeout
plan:
- task: dns-lookup
hermetic: true
config:
platform: linux
image_resource:
type: registry-image
source:
repository: alpine
run:
path: sh
args:
- -c
- |
echo "Starting DNS lookup..."
time nslookup google.com
echo "Done."
Trigger the job and observe how long nslookup example.com takes to return
Expected Results
DNS lookups in a hermetic container should fail immediately. Since all outbound traffic is intentionally blocked, there is no point sending DNS packets at all.
Actual Results
Tools that do DNS lookups at startup (e.g. package managers, SDKs, manifest validators) can take 30–40 minutes to begin actual work, spending all that time exhausting DNS retry cycles against a silent firewall.
Activity