Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live-reloading config via Admin API fails due to the "one work_dir per HTTP server" rule #17

Open
vikanezrimaya opened this issue Oct 11, 2024 · 5 comments

Comments

@vikanezrimaya
Copy link

Repro for Caddy v2.8.4 and this module v1.0.5:

$ CADDY_ADMIN="localhost:2019" caddy run &

$ curl [email protected] -H "Content-Type: application/json" http://localhost:2019/config/
{"error":"loading new config: loading http app module: provision http: server srv0: setting up TLS connection policies: loading client cert verifiers: position 0: loading module 'revocation': provision tls.client_auth.verifier.revocation: The same work dir ./crl was defined for multiple servers"}
@Gr33nbl00d
Copy link
Owner

Hm interesting. I will have a look at it on Monday. Might be a timing issue

@Gr33nbl00d
Copy link
Owner

A first code analysis did not reveal any issue. In theorie the cleanup should be called before another provision. I will try to debug this in the next days. How many servers did you have configured ? Only 1?

@vikanezrimaya
Copy link
Author

vikanezrimaya commented Oct 15, 2024 via email

@Gr33nbl00d
Copy link
Owner

How many servers did you have configured ? Only 1?
Yes, that's only one server. I can try making a minimal config for reproduction.

yeah a minimal config could help. Currently i try to reproduce it and i already got a problem related to opening ports during reloading: Not related to revocation in general. I wonder if the provision/cleanup of modules in caddy is broken.

Which operating system are you on?

@Gr33nbl00d
Copy link
Owner

Should be fixed.
i am currently doing some code cleanup in a feature branch. I fixed it there.

I would like to do some more extensive testing before merging it to master, because it was quite a big change needed. Maybe you can try to build with the feature branch?

https://github.com/Gr33nbl00d/caddy-revocation-validator/tree/fb-codecleanup

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

No branches or pull requests

2 participants