[Bug]: Host DNS NXDOMAIN has no SOA, so macOS caches it and a re-created cluster name stays unresolvable
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- swift
- Domain
- networking
Research direction
Start with Sources/DNSServer/Handlers/NxDomainResolver.swift, named in the issue, and inspect how it builds NXDOMAIN responses and uses ttl. Check the DNS response tests for coverage of authority records and negative caching. Done means NXDOMAIN responses include an SOA with a short minimum TTL and the regression is covered by a test.
Written by the indexing model from the issue text.
Description
I have done the following
- I have searched the existing issues
- If possible, I've reproduced the issue using the 'main' branch of this project (reproduced on the 1.7.1 release)
Steps to reproduce
- Create cluster
demo, then delete it. - Look up
demo.testfrom the Mac while it doesn't exist (e.g.kubectlwith the old kubeconfig): NXDOMAIN. - Re-create cluster
demo. kubectl get nodeswith the new kubeconfig.
Problem description
Step 4 fails with dial tcp: lookup demo.test: no such host for minutes (two attempts in a row), while container cluster list --nodes shows the node running with an IP. A cluster with a fresh name resolves in 0.05 s.
Likely cause: NxDomainResolver (Sources/DNSServer/Handlers/NxDomainResolver.swift) returns NXDOMAIN without an SOA in the authority section, and its ttl is unused. Per RFC 2308 the negative-cache lifetime is then left to the resolver, and macOS kept it for minutes. Returning an SOA with a short minimum TTL (a few seconds) would bound it.
Seen on an M4 Pro.
Environment
- OS: macOS 27.2.1 (26B131)
- Xcode: n/a (signed release pkg)
- Container: 1.7.1 (a15b460)
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- Swift
- Stars
- 51.9k
- Forks
- 1.8k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 27
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apple/container
-
[Bug]: Kernel download ignores credentials in HTTPS_PROXY and fails with proxyAuthenticationRequiredOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apple/container#2499 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: `container machine logs -f` exits immediately when the log is emptyPossibly taken @srivilliamsai claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apple/container#2492 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: Intermittent failure in PathUtilsTests.testNewDirectoryIsExcludedAndExistingChoiceIsKeptOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
apple/container#2474 · 2 comments ·
Maintainers usually reply within 1 day
-
[Request]: container ls --filter label=key=valuePossibly taken @kavix claimed this 21 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apple/container#2403 · 1 comment ·
Maintainers usually reply within 1 day
-
[Request]: Improve robustness and path resolution in ensure-hawkeye.shPossibly taken @denizguney claimed this 45 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
Similar issues
-
🎉 Add MPP ViewerOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
jaywcjlove/awesome-mac#4728 ·
Maintainers usually reply within 1 day
-
compiler diagnostics quality ownership SIL ownership
Difficulty 1/5 Under an hour Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
T-Defect
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
element-hq/element-x-ios#6536 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
fxios-coreexperience
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mozilla-mobile/firefox-ios#36661 ·
Maintainers usually reply within 1 day