Propagation_timeout in Caddyfile

1. Caddy version (caddy version):

v2.4.1 h1:kAJ0JB5Xk5gPdTH/27S5cyoMGqD5lBAe9yZ8zTjVJa0=

2. How I run Caddy:

Windows 10 Pro with go version go1.16.3 windows/amd64
I am running caddy from within a library of a dns provider I am developing using
xcaddy run

a. System environment:

Windows 10 Pro, Powershell

b. Command:

xcaddy run

c. Service/unit/compose file:

Not used

d. My complete Caddyfile or JSON config:

{
    debug
}
test.kmpm.io
tls {
    issuer acme {
        email "<redacted email>"
        timeout "15m0s"
        propagation_timeout "15m0s"
        dns loopia {
            username "<redacted>"
            password "<redacted>"
        }
        resolvers ns1.loopia.se
    }
}
respond "Hello, world!"

3. The problem I’m having:

I am developing a acme dns provider for caddy for https://loopia.se
Loopia have a really long propagation time for DNS changes, up to 15 minutes and I cant get caddy/acme to wait long enough.

When using JSON config you could set propagation_timeout that seems to fix it but I can’t figure out how to set it using a Caddyfile.

Could it be as simple as caddyfile not supporting the propagation_timeout directive? I really hope not since there is a lot of extra fluff if I were forced to use JSON because of one single line.

4. Error messages and/or full log output:

xcaddy run
2021/05/25 17:57:31 [INFO] Resolved relative replacement github.com/kmpm/libdns-loopia=>../libdns-loopia to D:\Code\kmpm\dns-loopia\libdns-loopia
2021/05/25 17:57:31 [INFO] Temporary folder: C:\Users\peter\AppData\Local\Temp\buildenv_2021-05-25-1757.944082367
2021/05/25 17:57:31 [INFO] Writing main module: C:\Users\peter\AppData\Local\Temp\buildenv_2021-05-25-1757.944082367\main.go
2021/05/25 17:57:31 [INFO] Initializing Go module
2021/05/25 17:57:31 [INFO] exec (timeout=10s): C:\Program Files\Go\bin\go.exe mod init caddy 
go: creating new go.mod: module caddy
go: to add module requirements and sums:
        go mod tidy
2021/05/25 17:57:31 [INFO] Replace github.com/kmpm/caddy-dns-loopia => D:\Code\kmpm\dns-loopia\caddy-dns-loopia
2021/05/25 17:57:31 [INFO] exec (timeout=10s): C:\Program Files\Go\bin\go.exe mod edit -replace github.com/kmpm/caddy-dns-loopia=D:\Code\kmpm\dns-loopia\caddy-dns-loopia 
2021/05/25 17:57:31 [INFO] Replace github.com/kmpm/libdns-loopia => D:\Code\kmpm\dns-loopia\libdns-loopia
2021/05/25 17:57:32 [INFO] exec (timeout=10s): C:\Program Files\Go\bin\go.exe mod edit -replace github.com/kmpm/libdns-loopia=D:\Code\kmpm\dns-loopia\libdns-loopia 
2021/05/25 17:57:32 [INFO] Pinning versions
2021/05/25 17:57:32 [INFO] exec (timeout=0s): C:\Program Files\Go\bin\go.exe get -d -v github.com/caddyserver/caddy/v2 
go get: added github.com/caddyserver/caddy/v2 v2.4.1
2021/05/25 17:57:34 [INFO] Build environment ready
2021/05/25 17:57:34 [INFO] Building Caddy
2021/05/25 17:57:34 [INFO] exec (timeout=0s): C:\Program Files\Go\bin\go.exe mod tidy 
go: found github.com/kmpm/caddy-dns-loopia in github.com/kmpm/caddy-dns-loopia v0.0.0-00010101000000-000000000000
2021/05/25 17:57:34 [INFO] exec (timeout=0s): C:\Program Files\Go\bin\go.exe build -o D:\Code\kmpm\dns-loopia\caddy-dns-loopia\caddy.exe -ldflags -w -s -trimpath 
2021/05/25 17:57:39 [INFO] Build complete: caddy.exe
2021/05/25 17:57:39 [INFO] Cleaning up temporary folder: C:\Users\peter\AppData\Local\Temp\buildenv_2021-05-25-1757.944082367
2021/05/25 17:57:39 [INFO] Running [caddy.exe run]

2021/05/25 15:57:40.143 INFO    using adjacent Caddyfile
run: adapting config using caddyfile: parsing caddyfile tokens for 'tls': Caddyfile:10 - Error during parsing: unrecognized ACME issuer property: propagation_timeout
2021/05/25 17:57:40 [ERROR] exit status 1

5. What I already tried:

  • tried moving around the propagation_timeout to all kind of places in the caddyfile
  • tried with the timeout as a replacement
  • got it working using JSON config with propagation_timeout, but it’s a awful amount of extra config just to add that single directive

6. Links to relevant resources:

That option currently isn’t supported in the Caddyfile. Feel free to open an issue on Github to request it (or you can try to implement it, following the resolvers option as a template, PRs welcome)

After getting my head around the source for Caddy I found the same, propagation_timeout is not supported.

And that’s why issue #4177 and PR #4178 is already in.

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.