aiida-core icon indicating copy to clipboard operation
aiida-core copied to clipboard

Using s6 service ready notification instead of sleep

Open unkcpz opened this issue 2 months ago • 17 comments

fixes #6448

For the container that includes the services, aiida prepare script is called as soon as the RabbitMQ startup script has been launched, but it can take a while for the RMQ service to come up. If verdi presto is called straight away it is possible it tries to connect to the service before that and it will configure the profile without a broker.

This PR using s6-notifyoncheck to do the health check every 500ms until the RMQ is ready. As suggested by https://github.com/just-containers/s6-overlay/issues/582. From my investigation, RMQ didn't provide the pre-active readiness notification to the file descriptor by the its daemon. Thus I use readiness polling.

unkcpz avatar Jun 07 '24 11:06 unkcpz