Skip to content
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

riak_cs won't get TERM signal to stop gracefully #10

Closed
pataquets opened this issue Oct 13, 2023 · 2 comments
Closed

riak_cs won't get TERM signal to stop gracefully #10

pataquets opened this issue Oct 13, 2023 · 2 comments

Comments

@pataquets
Copy link

CMD /opt/riak-cs/bin/riak-cs foreground

As per CMD documentation, this will wrap riak_cs process in a sh subprocess.
This would prevent external signals from docker from reaching riak_cs process. docker stop is basically doing a docker kill -s TERM graceful stop.

Since, riak_cs foreground should be always run, with optional command line switches, I would suggest to use ENTRYPOINT instead. Otherwise, as a lesser evil, at least use CMD's exec form.

I can submit a PR, if desired.

@pataquets pataquets changed the title riak_cs' won't get TERM` signal to stop gracefully riak_cs won't get TERM signal to stop gracefully Oct 13, 2023
@hmmr
Copy link

hmmr commented Oct 13, 2023

The Dockerfile we provide is more of a "reference implementation", rather than an attempt to provide for real-world production cases. Some may want to build and run it on the latest OTP-25 or -26 while others may have reasons to stick with OTP-22. Some might even choose to install it from a package instead of building it inside a docker container. There's also an issue with configuring it: one can mount a dir with customized riak-cs.conf from their Dockerfile at runtime, or directly edit it as part of start-up command sequence ending with riak-cs start. We make no attempt to cover all bases here.

There is a sister project, https://github.com/TI-Tokyo/riak_cs_service_bundle, which you may find useful or inspiring.

That said, I will gladly review and accept your PR.

@pataquets
Copy link
Author

Thanks for the quick answer and for all the useful info.
In fact, I wasn't aware of the bundle repo. I will check it out for sure.
I've sent the above mentioned PR. As a bonus, I've sent another PR which can account for the usage case you mention of customizing the Erlang version used in the build (see #12).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants