Skip to content

fix: make DNS-01 propagation timeout configurable - #260

Merged
umputun merged 2 commits into
masterfrom
fix/dns-propagation-timeout
Aug 20, 2026
Merged

fix: make DNS-01 propagation timeout configurable#260
umputun merged 2 commits into
masterfrom
fix/dns-propagation-timeout

Conversation

@umputun

@umputun umputun commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Fix #258, DNS-01 issuance failing on zones that publish challenge records slower than CertMagic's 2 minute timeout.

what happens today: app/proxy/ssl.go builds the DNS01Solver without setting PropagationTimeout, so every deployment gets CertMagic's 2 minute default (defaultDNSPropagationTimeout, solvers.go:527). A zone publishing slower loses the race, the challenge record is deleted, and the retry loses it again. The reporter measured his Cloudflare zone publishing between 75s and 120s, with 5 of 12 FQDNs never obtaining a certificate and previously issued certs failing to renew. --ssl.dns.ttl does not help, it sets the record TTL rather than how long the solver waits.

the change: new --ssl.dns.propagation-timeout / SSL_DNS_PROPAGATION_TIMEOUT, default 2m so current behaviour is unchanged, carried on proxy.SSLConfig and set on certmagic.DNSManager.

scope is deliberately narrow. PropagationDelay was considered and left out: it sleeps and then starts the full timeout window anyway (solvers.go:421), so it does not help a slow zone and only slows the fast case. Resolvers was left out too, it turns off authoritative-server checking (solvers.go:442) and steers zone discovery (solvers.go:382), so it changes what counts as propagated rather than a duration. That gap is recorded in docs/backlog instead.

tests cover both wiring halves, option to config in app/main_test.go and config to solver in app/proxy/ssl_test.go.

CertMagic waits 2 minutes for challenge records to propagate and reproxy never
set the field, so a zone publishing slower than that could never issue or renew
certificates and had no workaround. Adds --ssl.dns.propagation-timeout with 2m
as the default, so existing behaviour is unchanged.

Related to #258
Found while fixing #258. Resolvers changes what counts as propagated rather
than how long to wait, so it was kept out of that fix.
Copilot AI lite review requested due to automatic review settings August 20, 2026 08:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@umputun
umputun merged commit a324d6d into master Aug 20, 2026
6 checks passed
@umputun
umputun deleted the fix/dns-propagation-timeout branch August 20, 2026 08:32
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.

DNS-01 fails when zone propagation approaches CertMagic's 2-minute timeout, which isn't configurable

2 participants