Repository navigation
Fail system startup when a DNS listener cannot bind - #2524
Open
srivilliamsai wants to merge 1 commit into
Open
srivilliamsai wants to merge 1 commit into
srivilliamsai wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Motivation and Context
Fixes #2519.
When another process holds either loopback DNS port,
container system startcan exit successfully with DNS unavailable. Bind both UDP listeners before starting plugins or exposing the normal API. If a bind fails, return the resolver name, endpoint, and socket error through the existing health check. The CLI removes the launchd job it registered so the next start can succeed once the port is free.Testing
Tested locally
Added regression coverage
Reproduced on Apple silicon. Before the fix,
system startandsystem statusboth exited 0 with either port held. After the fix, both exit 1, and startup names the resolver and port and reports the bind error.After releasing each port, startup and status succeeded without an intervening stop. Both listeners answered DNS queries on a host without
/etc/resolver, and invoking start again preserved the running service.Ran an Alpine container after recovery and resolved its registered name,
dnsprobe.test, on UDP port 2053.Built
containerandcontainer-apiserverwith warnings treated as errors. All 94 DNS tests passed, including the UDP bind conflict regression, andmake checkpassed.The full test build reached the host's disk limit, so the full
make verifyrun remains for CI.