Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add daemontools support #265

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

At Mochi Media, we are starting Riak using 'riak console' instead of 'riak start', since daemontools doesn't work with background applications, and run_erl doesn't properly handle signals.

Also, we had to implement our own command "riak remsh", which is basically "erl -remsh".

  • Add 'riak dt_start' command to be executed from daemontools run script.
  • Extend 'riak attach' command to determine riak start mode and use
    "erl remsh" for daemontools-started node.

P.S. If this goes upstream, we'll finally be able to use 100% non-customized Riak :)

Add daemontools support
* Add 'riak dt_start' command to be executed from daemontools run script.
* Extend 'riak attach' command to determine riak start mode and use
  "erl remsh" for daemontools-started node.
Contributor

jaredmorrow commented Jan 8, 2013

Thanks for the PR @doubleyou, we've talked about doing something similar actually with the remsh because of our problems with attach you mentioned.

We are in a release cycle right now, so I'll have to come back to this PR after 1.3 branches for RC status.

Thanks again.

Frankly, run_erl way sucks in many ways.

  • Too easy to accidentally close Erlang, by pressing usual Ctrl+C instead of expected Ctrl+D.
  • Attached console is extremely inconvenient, compared to the one from "erl -remsh"
  • All attached console IO goes into logs as well, might be bad for logs processing software
  • Its logs rotation ways is inconvenient

Have you ever considered getting rid of the run_erl completely? Lager can do logs rotation much better. And multilog from daemontools does this even more awesome, IMO, (I'm even thinking of making another logs rotation method for lager, completely similar to multilog's way).

Besides logs rotation, I don't see any reasons for keeping run_erl, at least so far I see its purpose.

Contributor

jaredmorrow commented Jan 8, 2013

This is related to #254

Contributor

jaredmorrow commented Apr 11, 2013

@doubleyou is the change made in basho/riak#254 sufficient for your needs? If so I will go ahead and close this PR.

Yeah, I think we're good. We'll just set ERL_FLAGS for -noshell and -noinput. Thanks!

@doubleyou doubleyou closed this Apr 15, 2013

Contributor

jaredmorrow commented Apr 15, 2013

Thanks @doubleyou

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment