Skip to content

Align DNS doctor ports with CoreDNS bindings#151

Merged
aidankhogg merged 1 commit into
dev/alphafrom
codex/update-dns-port-readiness-behavior
Jun 29, 2026
Merged

Align DNS doctor ports with CoreDNS bindings#151
aidankhogg merged 1 commit into
dev/alphafrom
codex/update-dns-port-readiness-behavior

Conversation

@aidankhogg

Copy link
Copy Markdown
Contributor

Motivation

  • Ensure the doctor preflight readiness checks for DNS reflect the actual ports CoreDNS publishes so port readiness checks do not diverge from runtime behavior.
  • Make CoreDNS publish both UDP and TCP on port 53 because DNS uses UDP for normal queries and TCP for truncation/large responses, and keep the doctor probes aligned with that.
  • Provide clearer guidance for macOS/Docker Desktop users about privileged port 53 binding and the option to use an alternate host DNS port.

Description

  • Add COREDNS_PORT_BINDINGS and COREDNS_PORTS constants and update _deploy_coredns to expose and bind both 53/udp and 53/tcp using these shared constants in netengine/handlers/dns.py.
  • Keep both KnownPort(53, "tcp", "DNS") and KnownPort(53, "udp", "DNS") in KNOWN_LOCAL_PORTS and ensure the doctor checks remain required for both protocols in netengine/diagnostic/preflight.py.
  • Improve the port 53 hint _DNS_PORT_HINT to mention macOS with Docker Desktop, privileged host-port binding, and a configurable alternate DNS host port in netengine/diagnostic/preflight.py.
  • Add tests in tests/test_doctor.py that assert the doctor’s required DNS ports match COREDNS_PORT_BINDINGS and that the updated port-53 hint contains the macOS/Docker Desktop guidance.

Testing

  • Ran python -m pytest tests/test_doctor.py -q, and the test suite completed successfully (17 passed).
  • Ran linter checks with ruff on the modified files and they passed with no issues.

Codex Task

@aidankhogg aidankhogg self-assigned this Jun 29, 2026
@aidankhogg aidankhogg added bug Something isn't working enhancement New feature or request labels Jun 29, 2026
@aidankhogg aidankhogg merged commit d14fda2 into dev/alpha Jun 29, 2026
@aidankhogg aidankhogg deleted the codex/update-dns-port-readiness-behavior branch June 29, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working codex enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant