-
Notifications
You must be signed in to change notification settings - Fork 217
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
Can I add healthcheck to the services dependencies? #582
Comments
Your problem is readiness notification. Here is how s6 handles it. Please read this page before anything else. If RabbitMQ can support direct readiness notification via a command-line option, then that's what you should use. If it cannot, then you should put a call to your healthchecker in a script named |
Thanks! Sounds it is the tool I need. I'll give it a try. So I'll close the issue for the moment, will reopen if more questions coming up. |
Hi @skarnet, I did apply a pool healthchecker and tested works on Linux with both docker and podman but now with docker on windows with WSL. The problem in WSL docker looks like the pool healthcheck is running but block the following service to start. Do you have any clue on what could be wrong? |
I answered directly on the linked issue. If it's specific to a given environment, especially a weird one such as WSL, then I don't think the problem is related to s6-overlay; it's likely something in the environment that makes the readiness reporting fail. We'll see. |
In our docker image, we start the main service (oneshot) based on the rabbitmq (longrun) (https://github.com/aiidateam/aiida-core/blob/fa28ebfc1a6dbd25a86de2ab2d38ea36794362db/.docker/aiida-core-with-services/s6-assets/s6-rc.d/aiida-prepare/dependencies.d/rabbitmq)
We start the RMQ service (type
longrun
) with:But we realised the RabbitMQ service start to fast that it is not ready for our service to detect it. We workaround it by adding a
sleep
in the startup script.Is
s6-overlay
support to add a healthcheck to the dependencies services only do the following services launching after healthcheck is passing as docker compose?We also have a docker-compose file to start the rabbitmq as another independent container, so we can do healthcheck and then start the main container. It 'll be great to have similar thing with s6-overlay I assume?
The text was updated successfully, but these errors were encountered: