[GH-ISSUE #232] Feature Request: emit log message when acme-dns is actually ready #109

Open
opened 2026-03-13 15:48:00 +03:00 by kerem · 0 comments
Owner

Originally created by @jvanasco on GitHub (Jun 10, 2020).
Original GitHub issue: https://github.com/acme-dns/acme-dns/issues/232

I'd like to hook acme-dns into automated tests for a Python client, instead of mocking endpoints. To accomplish this, I need to know when acme-dns has successfully started.

I would love to see a log line such as

INFO[001] acme-dns is ready

I tried generating a PR, but this is much harder than expected. While the database appears to fail instantly when a problem is encountered, the following components seem to be spawned into async tasks that could fail/succeed at any point:

  • HTTP Listen
  • DNS Listen UDP/TCP
  • Certificate Maintenance Routine

Because of this, as an example: If there is an issue in binding the DNS server to a port, the error message will appear after the "Listening" message

INFO[0000] Listening DNS                                 addr="127.0.0.1:53" proto=tcp
INFO[0000] Listening HTTP                                host="0.0.0.0:8011"
INFO[0000] 2020/06/10 13:01:06 [INFO][cache:0xc0000a2690] Started certificate maintenance routine 
INFO[0000] Listening DNS                                 addr="127.0.0.1:53" proto=udp
FATA[0000] listen tcp 127.0.0.1:53: bind: permission denied 

Having a log message appear when either of these two things happen would be very useful:

  • every element is successfully bound to a port
  • each element is bound to a port

Right now I have to just wait a few seconds after everything subsystem starts, then inspect the process to hope it is alive and there were no errors logged. This is brutal on my test times.

Originally created by @jvanasco on GitHub (Jun 10, 2020). Original GitHub issue: https://github.com/acme-dns/acme-dns/issues/232 I'd like to hook `acme-dns` into automated tests for a Python client, instead of mocking endpoints. To accomplish this, I need to know when acme-dns has successfully started. I would love to see a log line such as INFO[001] acme-dns is ready I tried generating a PR, but this is much harder than expected. While the database appears to fail instantly when a problem is encountered, the following components seem to be spawned into async tasks that could fail/succeed at any point: * HTTP Listen * DNS Listen UDP/TCP * Certificate Maintenance Routine Because of this, as an example: If there is an issue in binding the DNS server to a port, the error message will appear *after* the "Listening" message ``` INFO[0000] Listening DNS addr="127.0.0.1:53" proto=tcp INFO[0000] Listening HTTP host="0.0.0.0:8011" INFO[0000] 2020/06/10 13:01:06 [INFO][cache:0xc0000a2690] Started certificate maintenance routine INFO[0000] Listening DNS addr="127.0.0.1:53" proto=udp FATA[0000] listen tcp 127.0.0.1:53: bind: permission denied ``` Having a log message appear when either of these two things happen would be very useful: * every element is successfully bound to a port * each element is bound to a port Right now I have to just wait a few seconds after everything subsystem starts, then inspect the process to hope it is alive and there were no errors logged. This is brutal on my test times.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/acme-dns#109
No description provided.