Skip to content

fix: Hermetic doesn't configure hosts on the containers - #9634

Merged
taylorsilva merged 3 commits into
concourse:masterfrom
Kump3r:fix-hermetic-no-dns
Jul 14, 2026
Merged

taylorsilva merged 3 commits into
concourse:masterfrom
Kump3r:fix-hermetic-no-dns

Conversation

@Kump3r

@Kump3r Kump3r commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Changes proposed by this PR

closes #9633

  • network.go- added hermetic bool parameter to the SetupMounts interface method
  • cni_network.go - when hermetic is true, write an empty /etc/resolv.conf instead of copying nameservers from the host
  • backend.go - compute hermetic once and pass it through to SetupMounts
  • runtimefakes/fake_network.go - updated generated fake to match the new signature
  • cni_network_test.go - updated all existing calls to pass hermetic: false; added new test asserting that a hermetic container gets an empty resolv.conf even when nameservers are configured on the worker

Notes to reviewer

Without fix:

Screenshot 2026-07-08 at 13 29 19

With fix:

Screenshot 2026-07-08 at 13 34 27

@Kump3r
Kump3r requested a review from a team July 8, 2026 10:42

@taylorsilva taylorsilva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Good quality of life change for tasks that use hermetic.

@taylorsilva
taylorsilva merged commit 8200d5b into concourse:master Jul 14, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Pull Requests Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Hermetic containers stall on DNS timeouts instead of failing fast

2 participants