rudolfs icon indicating copy to clipboard operation
rudolfs copied to clipboard

Use docker supplied tini

Open daniel-noland opened this issue 2 years ago • 2 comments

Marking this as draft for now as most of the commits in the series should not be merged as part of this PR.

See #51 for details.

Only the last commit in the current (as of time of writing) series is properly part of this PR.

It is just pointless to introduce another merge conflict in the CHANGELOG.md given that I expect #46 is about to be merged. Will just rebase after that happens and skip the potential confusion of moving around in version numbers.

daniel-noland avatar Oct 03 '22 17:10 daniel-noland

https://github.com/jasonwhite/rudolfs/pull/46 is merged now. Feel free to rebase!

One thing that I'd include with this change is a warning message if Rudolfs is PID 1. That is, check if std::process::id() == 1 early on during start up and log a warning message saying something like

Warning: Rudolfs is the root PID. If you're running it under Docker, use docker run --init to allow Docker to gracefully shutdown the server.

jasonwhite avatar Oct 03 '22 17:10 jasonwhite

#46 is merged now. Feel free to rebase!

One thing that I'd include with this change is a warning message if Rudolfs is PID 1. That is, check if std::process::id() == 1 early on during start up and log a warning message saying something like

Warning: Rudolfs is the root PID. If you're running it under Docker, use docker run --init to allow Docker to gracefully shutdown the server.

That seems like a good compromise. I'll try to take care of it a little later this week

daniel-noland avatar Oct 04 '22 02:10 daniel-noland

This PR has become a little stale. Closing.

tini is still working well. Alternatively, this could actually be handled by Rudolfs itself rather easily if running as pid 0. Since it doesn't spawn any child processes, it shouldn't need to reap any zombies. I think all it needs to do is gracefully handle SIGTERM by sending a shutdown signal to the LFS server.

jasonwhite avatar Apr 19 '24 05:04 jasonwhite