Re: another distro using runit...

From: John Albietz <inthecloud247_at_gmail.com>
Date: Tue, 21 Oct 2014 12:18:56 -0700

Merci Laurent,

I'll definitely go through more of the archives. Thanks for the tip.

Would you then be in support of moving the pre/enable logic into a separate
utility (something similar to `chpst)? So for example:

runwith --ExecStartPre "mkdir /var/log/mysql" --ExecReload
"/root/drain_reload.sh" mysqld

Alternatively, using current runit functionality, what would you think
about if I simply add additional service directories that get loaded in
order. So I could have all enable/pre scripts run as one-time runit
services in a separate svdir:

/etc/runit/runsvdir/configure/mysql/
/etc/runit/runsvdir/services/mysql/

And when my container (or vm/machine) start up, I have my runlevel 2 script
set up to first `runsvchdir configure` and then when those services all
successfully stop at the end of their execution, I then run `runsvchdir
services`.

Or is that too hacky/cludgy?

John Albietz
m: 516-592-2372
e: inthecloud247_at_gmail.com
l'in: linkedin.com/in/ydavid

On Tue, Oct 21, 2014 at 2:08 AM, Laurent Bercot <ska-supervision_at_skarnet.org
> wrote:

> Le 20/10/2014 19:52, John Albietz a écrit :
>
>> - With nearly all of my services, I create enable scripts that check for,
>> and if necessary set up directories and perhaps even default passwords or
>> databases. And I haven't found an elegant way yet to integrate this into
>> runit. I think it would be useful to separate out a command for 'enable'
>> that would run successfully only once for a service.
>>
>
> runit, like other supervision frameworks, doesn't have a notion of machine
> state: its point is to supervise processes, not to perform machine state
> management.
> This is exactly what supervision frameworks are currently lacking when
> compared to popular init systems: a vision of the global machine state
> involving more than processes. We've discussed about it before, check the
> recent list archives.
>
> A summary of my position is that machine management can be done in a right
> and elegant way, but should not be integrated *into* supervision frameworks
> - it should be implemented *above* them.
>
> --
> Laurent
>
Received on Tue Oct 21 2014 - 19:18:56 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC