Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2018 16:47:24 +0100
From:      Jan Bramkamp <crest@rlwinm.de>
To:        Mark Saad <nonesuch@longcount.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: S6-init was: OpenRC 0.35 for FreeBSD
Message-ID:  <c282d533-68ac-d4ba-62de-00858c019bd0@rlwinm.de>
In-Reply-To: <0120B9B9-74CA-47CF-8890-574AB3DC8115@longcount.org>
References:  <CAFvkmYNBtH-MizOLVnSR0c5VuYRpYEDpyWig2x%2By7PM6rQkL=A@mail.gmail.com> <20180302083756.GH34685@e.0x20.net> <BE852FF1-A856-4913-93CA-3F7F67DEB855@FreeBSD.org> <35AC3784-D02B-4EB1-9F82-E522B7A7730E@FreeBSD.org> <e74f8ce3-fab5-bac6-65b0-c77799cf5ac3@rlwinm.de> <0120B9B9-74CA-47CF-8890-574AB3DC8115@longcount.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06.03.18 15:16, Mark Saad wrote:
> 
> 
>> On Mar 6, 2018, at 7:34 AM, Jan Bramkamp <crest@rlwinm.de> wrote:
>>
>>> On 02.03.18 17:11, Jonathan Anderson wrote:
>>>> On 2 Mar 2018, at 12:13, Jonathan Anderson wrote:
>>>>
>>>> [...] there are a number of options that I've heard of vying for consideration:
>>>>
>>>>   - finit
>>>>   - jobd (is this still a thing?)
>>>>   - nosh
>>>>   - OpenRC
>>>>   - runit
>>> Oh, and also s6: https://skarnet.org/software/s6/why.html
>>
>> I've run s6 + s6-rc as init replacement for FreeBSD 11.1 on my laptop for over a year. The init_path kenv simplifies testing alternative init systems a lot. It works really well and required only minimal porting.
> 
> Jan
>    I am interested to know more ; do you have any notes ? Also did you ever try runit? Again it’s another similar project but if I remember it’s in ports .

I used runit as init replacement on my previous laptop, but found it 
limitations to annoying. Runit is a pure process supervisor. The only 
state runit tracks are supervised processes and there are is no support 
for dependencies. And while it supports readiness checks those are 
implemented by polling every 100ms. The only way to track state with 
runit is to wrap it with a sleeping process.

I'm still using runit on my servers. On those I have start runsv from a 
rc.d script. This runsv provides a default log replacing readproctile 
style hacks and spawns the runsvdir. The result looks like this:

daemon---runsv-+-runsvdir-+-runsv-+-rspamd-1.6.6---35*[rspamd-1.6.6]
                |          |       `-svlogd
                |          |-runsv-+-socklog
                |          |       `-svlogd
                |          |-runsv-+-dovecot-+-anvil
                |          |       |         |-auth
                |          |       |         |-config
                |          |       |         `-log
                |          |       `-svlogd
                |          |-2*[runsv]
                |          |-runsv---master-+-anvil
                |          |                |-cleanup
                |          |                |-7*[dnsblog]
                |          |                |-2*[lmtp]
                |          |                |-2*[local]
                |          |                |-pickup
                |          |                |-postscreen
                |          |                |-qmgr
                |          |                |-smtpd
                |          |                |-tlsmgr
                |          |                `-trivial-rewrite
                |          |-runsv-+-sshd---sshd---sshd---zsh-+-cat
                |          |       |                          `-dtpstree
                |          |       `-svlogd
                |          |-runsv-+-redis-server
                |          |       `-svlogd
                |          |-runsv-+-nginx---nginx
                |          |       `-svlogd
                |          `-runsv---spiped
                `-svlogd

Runit is a fine process supervisor, but the development ended years ago 
with a "finished" product. The author decided that process supervision 
is enough and didn't try to write the missing service manager on top of 
runit. An other downside of runit compared to s6 is that it uses polling 
instead of proper readiness notification. If you have questions 
regarding s6 or s6-rc there are the #s6 (and #s6-offtopic) IRC channels 
on freenode and the skarware mailing lists 
(http://skarnet.org/lists.html#skaware).

I did keep notes. I just didn't publish them because they are nothing 
more than an unstructured brain dump. I'm happy to answer any questions.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c282d533-68ac-d4ba-62de-00858c019bd0>