supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: "Scott Colby" <scott@scolby.com>,
	"supervision@list.skarnet.org" <supervision@list.skarnet.org>
Subject: Re: Supervision on the BSD's
Date: Sat, 09 Apr 2022 13:43:52 +0000	[thread overview]
Message-ID: <ema9228f75-ad12-4d92-9510-2eac43fe4b97@elzian> (raw)
In-Reply-To: <0c1d24f1-fa0e-4c00-a94f-3173110b3800@www.fastmail.com>

>In searching, I found some messages on the Skaware lists about
>running s6 as PID 1 on FreeBSD; has that work been published anywhere?
>I'm not sure if I want to go so far as replacing PID 1 right out
>of the gate, but having some existing service directories would be
>nice.
  I have done some experiments and my conclusion was that to replace
pid 1 on FreeBSD, a real s6-freebsd-init package was needed, because
the way the BSDs organize their init and shutdown is radically
different from the way Linux does it, and the conversion is far from
obvious.

  However, you don't need to replace pid 1 to run s6 on a BSD. As
mentioned in https://skarnet.org/software/s6/s6-svscan-not-1.html , you
can start a supervision tree from /etc/ttys, and run your services
under it. It will work like on any other system.

  Quite a few people on the #s6 channel on IRC (OFTC network) are using
s6 on a BSD, so if you're looking for example service directories, and
various tips and tricks, I suggest you join the channel and ask them. ;)


>Have I correctly understood how daemons/services work on the BSD's?
>If not, what am I missing? Are the daemons included with the
>distributions so incredibly stable that they don't need supervision
>in order to keep the system functional?

  The BSDs are tightly integrated systems, more than "distributions", and
especially with OpenBSD, daemons are carefully audited and patched so
they are indeed super stable. Which is a very good thing - but because
of that, the BSD community tends to look down on supervision, without
understanding that it has other benefits than auto-restarting crashed
daemons.


>Finally, if you wanted to create a router that you could (metaphorically)
>put in a closet and forget about for 5 years, what approach would
>you take? My initial thought was OpenBSD + s6, but I worry now that
>there could be an impedance mismatch between these systems.

  OpenBSD + s6 will definitely work. Just make sure not to get in the
way of how OpenBSD does things; run an s6 supervision tree at boot
time and start your services under it as you see fit, independently from
OpenBSD's rc.

  Since the BSDs don't care for supervision, though, depending on
upstreams it may be difficult to find options for your packaged daemons
that stop autobackgrounding and that are not debugging options. Just a
small practical hurdle, but when it happens it can be infuriating.

--
  Laurent


  parent reply	other threads:[~2022-04-09 13:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-09  5:38 Scott Colby
2022-04-09  7:57 ` Alexis
2022-04-09 11:36 ` Ramarro Marrone
2022-04-10 18:56   ` Oliver Schad
2022-04-09 13:43 ` Laurent Bercot [this message]
2022-04-11 17:18 ` J. Lewis Muir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ema9228f75-ad12-4d92-9510-2eac43fe4b97@elzian \
    --to=ska-supervision@skarnet.org \
    --cc=scott@scolby.com \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).