aiida-core
aiida-core copied to clipboard
Using s6 service ready notification instead of sleep
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.