feat: wait for RADIUS host DNS resolution before startup#55
Open
jozefrebjak wants to merge 1 commit intodevelopfrom
Open
feat: wait for RADIUS host DNS resolution before startup#55jozefrebjak wants to merge 1 commit intodevelopfrom
jozefrebjak wants to merge 1 commit intodevelopfrom
Conversation
In Docker Swarm with the -dns image variant, RADIUS_HOST may be a hostname that is not immediately resolvable if the target service is still starting up. Add wait_for_radius_hosts() that retries DNS resolution before writing config and starting the proxy. Configurable via RADIUS_HOST_WAIT_RETRIES (default 30) and RADIUS_HOST_WAIT_INTERVAL (default 2s), giving 60s total wait time. Closes #54
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.
Summary
wait_for_radius_hosts()in01-init.shthat retries DNS resolution for all configured RADIUS hosts before writing config and starting the proxy-dnsimage variant in Docker Swarm whereRADIUS_HOSTis a service nameRADIUS_HOST_WAIT_RETRIES30RADIUS_HOST_WAIT_INTERVAL2With defaults, proxy waits up to 60 seconds.
Closes #54
Test plan
RADIUS_HOST=freeradius_primarybefore RADIUS service is up — verify proxy waits and retriesRADIUS_HOST_WAIT_RETRIES=3and keep RADIUS down — verify proxy exits with clear error after 3 attempts