-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add dumb-init to rootless docker #21775
Conversation
I'm using it here1 and it's working fine. Docuum is running docker cli which could also hung some times. Footnotes |
I think we better fix the root issue so that deployments in docker-less environments can benefit too. Or at least, do the reaping in-process. |
on normal systems the init process does the process reaping, so no need to do anything there. the reaping should do the process with id zero. https://iximiuz.com/en/posts/dealing-with-processes-termination-in-Linux/ |
The rootful images uses s6 which seems to include a reaper. I'm not sure the reasoning why the rootless images does not have one, but I don't think we should have two different ones. |
so should I refactor to use s6 instead of dumb-init? dumb-init was a much simpler solution 😅 |
I'm not sure what the state-of-the-art reaper is but your dumb-init seems generally more popular than s6. Maybe we should get rid of s6, but please wait on more opinions, I'm no expert on this and we might overlook functionality provided by s6 that dumb-init does not have. https://github.com/Yelp/dumb-init |
ok, s6 is more like systemd, it can watch and restart multiple processes. dumb-init just starts one child process and exits when child dies. |
Yup, that's why it is used for the rootful one as we use opensshd in it as well. I think it's reasonable to use dumb-init for rootless. |
I'd also be happy if we could just do the reaping from within Gitea itself but I'm not against dumb-init being used. |
Please send backport to 1.18 |
@xin-u how is this breaking? |
will do tomorrow |
|
But arguments will still be passed to entrypoint.sh and and if you have provided custom entrypoint it would still work so I don't see use case that would break 🤔 |
* giteaofficial/main: Ensure that Chinese punctuation is not ambiguous when locale is Chinese (go-gitea#22019) Use GhostUser if needed for TrackedTimes (go-gitea#22021) Add dumb-init to rootless docker (go-gitea#21775) On tag/branch-exist check, dont panic if repo is nil (go-gitea#21787) Fix ListBranches to handle empty case (go-gitea#21921) fix(web): reduce page jitter on browsers that support overlay scrollbar (go-gitea#21850) [skip ci] Updated licenses and gitignores Do not emit ambiguous character warning on rendered pages (go-gitea#22016)
If user would pass |
yes, but it's not breaking. it overrided before the same. |
|
But it would still work for user with his custom entrypoint as no paths or anything else was changed, it would still work for him as it was before just dumb init would not be used |
Add dumb-init as process reaper to the rootless image.
I've very often defunc hung git processes, which are not cleaned by gitea.