Skip to content

fix(dns): avoid global resolver search domains - #2129

Closed
stephenlclarke wants to merge 1 commit into
apple:mainfrom
stephenlclarke:fix/scoped-dns-resolver
Closed

stephenlclarke wants to merge 1 commit into
apple:mainfrom
stephenlclarke:fix/scoped-dns-resolver

Conversation

@stephenlclarke

@stephenlclarke stephenlclarke commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Closes #1917.

Scoped files under /etc/resolver only need the domain, nameserver, and port. Removing the search directive prevents unrelated single-label hostnames from being expanded through a stopped container DNS server.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

Negative control on current main: the resolver fixture contained the global search directive.

  • HostDNSResolver focused suite: 5/5 passed
  • Full non-integration suite: 756 tests passed
  • make fmt, make check, and git diff --check: passed
  • Commit signature: verified

Keep scoped /etc/resolver entries limited to their configured domain. Omitting the search directive prevents unrelated bare hostnames from being expanded through a stopped container DNS service.

Fixes apple#1917
@stephenlclarke
stephenlclarke force-pushed the fix/scoped-dns-resolver branch from 123efc9 to 6404f2a Compare August 26, 2026 22:34
@stephenlclarke

stephenlclarke commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Refresh 2026-08-26: rebased the single signed fix onto current main (d96dfa3). New head: 6404f2a. Focused HostDNSResolverTest passed 5/5, and git diff --check passed.

@github-actions

Copy link
Copy Markdown

Code Coverage

Tier Line Coverage
Unit 24.78%
Integration 66.9%
Combined 76.24%

@stephenlclarke
stephenlclarke deleted the fix/scoped-dns-resolver branch August 31, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: leftover /etc/resolver/containerization.* 'search' directive hangs ALL bare-hostname DNS lookups system-wide once apiserver stops

1 participant