S6-init was: OpenRC 0.35 for FreeBSD
Jan Bramkamp
crest at rlwinm.de
Tue Mar 6 15:47:35 UTC 2018
On 06.03.18 15:16, Mark Saad wrote:
>
>
>> On Mar 6, 2018, at 7:34 AM, Jan Bramkamp <crest at 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.
More information about the freebsd-hackers
mailing list