Skip to content

feat: wait for RADIUS host DNS resolution before startup#55

Open
jozefrebjak wants to merge 1 commit intodevelopfrom
feat/radius-host-dns-wait
Open

feat: wait for RADIUS host DNS resolution before startup#55
jozefrebjak wants to merge 1 commit intodevelopfrom
feat/radius-host-dns-wait

Conversation

@jozefrebjak
Copy link
Copy Markdown
Contributor

Summary

  • Add wait_for_radius_hosts() in 01-init.sh that retries DNS resolution for all configured RADIUS hosts before writing config and starting the proxy
  • Relevant for -dns image variant in Docker Swarm where RADIUS_HOST is a service name
  • Document two new optional env variables in README
Variable Default Description
RADIUS_HOST_WAIT_RETRIES 30 Max resolution attempts
RADIUS_HOST_WAIT_INTERVAL 2 Seconds between attempts

With defaults, proxy waits up to 60 seconds.

Closes #54

Test plan

  • Start proxy with RADIUS_HOST=freeradius_primary before RADIUS service is up — verify proxy waits and retries
  • Start proxy after RADIUS service is up — verify immediate startup
  • Set RADIUS_HOST_WAIT_RETRIES=3 and keep RADIUS down — verify proxy exits with clear error after 3 attempts

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
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.

feat: wait for RADIUS host DNS resolution before startup (dns variant)

1 participant