-
Notifications
You must be signed in to change notification settings - Fork 192
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
Using s6 service ready notification instead of sleep #6469
Using s6 service ready notification instead of sleep #6469
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6469 +/- ##
==========================================
+ Coverage 77.51% 77.82% +0.31%
==========================================
Files 560 562 +2
Lines 41444 41889 +445
==========================================
+ Hits 32120 32594 +474
+ Misses 9324 9295 -29 ☔ View full report in Codecov by Sentry. |
Thanks @unkcpz did you try to build and run locally? I could build just fine, but when I run
it seems to get stuck:
but I am not sure if this is because I am doing something wrong |
Yes, I tested. The reason you got stuck is that you run this image with docker compose. Docker compose firing all the containers but didn't know where you want to get into which container. You can run |
Huh, but the For what it is worth, I tried running:
but it seems to get stuck with a problem in RabbitMQ at the same point
|
That is weird, it is all fine in my computer, can you try to |
That actually seems to work:
But the shell with which I ran If I CTRL+C the hanging
so it does indeed seem to have a problem with the service startup. Note that after the CTRL+C it does drop me into a bash shell, but RMQ does not seem to be running and the profile has not been created.
Final data point: when I leave the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sphuber thanks for the test and write up. It is strange and I have no idea why not working for you. I tested on my arm64 Macbook as well and I didn't get stuck.
I am curious to run with your image, maybe you can upload to docker.io and I can play with it to see what is the different? Meanwhile docker.io can show the layers so probably I can spot the different by compare layer by layer.
.docker/aiida-core-with-services/s6-assets/s6-rc.d/rabbitmq/run
Outdated
Show resolved
Hide resolved
FWIW On Fedora 39 using Podman instead of docker, the following also worked for me (I got a bash interactive prompt)
|
But that |
I am afk and will not get to this in the near future. But the image will get pushed to ghcr.io if you push this branch to origin. In general PRs modifying the docker image should be opened from branches on this origin repo for this reason. |
@danielhollas I think if I make the PR from repo to trigger the whole docker CI, it is not push to ghcr.io with |
It will. The tag will be different, it's the name of the branch. Also you can always download by digest. |
It is not apparently, or I did something wrong? see #6475 |
Hmm, that's definitely not working as intended then. Please take a look at
docker.yml, maybe I made a mistake there. Is the workflow running on main?
Dne čt 13. 6. 2024 11:28 uživatel Jusong Yu ***@***.***>
napsal:
… It is not apparently, or I did something wrong? see #6475
<#6475>
—
Reply to this email directly, view it on GitHub
<#6469 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACIY64IPWBNUJW4PL3COR7TZHFQ3LAVCNFSM6AAAAABI6OJABGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRVGEYTMOBQGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes, it runs in |
@sphuber It sounds like |
@skarnet thanks for the suggestion. It basically shows the same output I already shared before:
But again when I drop into the container with |
That is strange; there has to be some environmental difference between the failing and successful invocations of Can you strace both, so we can take a look at the result? i.e. in |
Thanks @skarnet I finally found the time to get around to trying your suggestion. I have attached the log. |
Actually, I tried switching |
I'm glad you found something that worked, because the Cheers! |
Thanks for your help anyway @skarnet much appreciated |
.docker/aiida-core-with-services/s6-assets/s6-rc.d/rabbitmq/data/check
Outdated
Show resolved
Hide resolved
Thanks both! I update the PR. |
Superseded by #6475 |
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 awayit 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 just-containers/s6-overlay#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.