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: "supervision@list.skarnet.org" <supervision@list.skarnet.org>
Subject: s6 usability (was: runit patches to fix compiler warnings on RHEL 7)
Date: Sat, 30 Nov 2019 10:15:27 +0000	[thread overview]
Message-ID: <em05e63d7b-23a0-41fe-88d1-c3c509f943e4@elzian> (raw)
In-Reply-To: <20191129140901.klifpegc74iv4zul@klumpi.ignorelist.com>

[-- Attachment #1: Type: text/plain, Size: 7170 bytes --]


>As a relatively new convert to supervision software, my reasons for
>preferring runit over s6 are, in order of priority:

Hi Jan,

Thank you a lot for this feedback. This is very useful UX return.
Let me address the points one by one.


>1) Debian ships with a working and maintained runit-init package. It
>    provides pid 1 and hooks into /etc/rcS.d/* to integrate with other
>    Debian packages. s6-linux-init and s6-rc are not packaged in Debian.

I hear you. Unfortunately, I have no control over what Debian does.
Debian isn't even able to ship a not-broken execline package, so I'm at
a loss on what to do with them. I'm working on a version of execline 
that
they *might* accept to package correctly, but it's doubtful as long as
the people in charge are prejudiced against the "lots of small binaries
in /bin" approach. :(


>2) runit has manpages. s6 has HTML. :(

This is far from the first time I hear this, so it would be foolish to
ignore it, but I *really* have a hard time understanding how in 2019 
it's
so difficult for people to launch a browser to read a web page. I just
can't get it. Launching a browser and reading a web page is something 
that
we all do, every day, even the least computer-savvy ones among us, and 
for
the life of me I can't fathom how this is *not* a friendly user 
interface.
HTML even has the advantages of hyperlinks, so you can jump around in 
the
documentation as needed, which you can't do with man pages!

Do you work offline? don't you have access to a web browser? do you like
reading stuff in a terminal *better*? (Text-based web browsers still
exist, if you do.)

It really stumps me. I did learn "man" too, 25 years ago, before the
Web existed. It was nice when man pages were all we had. But a couple of
years later, we had something that seems unarguably better to me, and
I see exactly zero reason to go back, apart from the force of habit of
typing "man".

Nevertheless, if people like man pages, they should have man pages, so
it's been a few years that I have appealed to the community for this.
I'm not going to learn nroff, ever, but we have a relatively large user
community, so they could probably contribute man pages, right? We've had
a few people who seemed interested, some of them even started thinking
about it *really hard*. And one of them even wrote a tool to convert
text into nroff, à la markdown (but simpler). But when it was about 
doing
the actual work of writing the man pages (even if all the material is
already here, in the HTML doc)? You guessed it: crickets.

So, yeah, I want s6 to be accessible, but I figure that if people
really wanted man pages, they'd write man pages ¯\_(ツ)_/¯ Or maybe I was
wrong all along and the spirit of Open Source really is "If the one 
person
doing the work doesn't do exactly what I want, then I'm just gonna sit 
on
my ass and blame them".

If I'm sounding a bit jaded, it's because I am.


>3) s6 executables are somehow worse named than runit's. This may be
>    highly subjective, but I can recall and recognize the runit commands
>    far easier than the s6 ones. Possibly it's the "s6-" prefix getting
>    in the way of my brain pattern matching on visual appearance of glyph
>    sequences.
>    This point is exacerbated by #2 and the number of s6 executables.
>    Compare chpst with s6-envdir s6-envuidgid s6-fghack s6-setsid
>    s6-setuidgid s6-applyuidgid s6-softlimit. Yes, I know about the
>    historical reasons, but still.

This is very interesting. I thought that having a s6- prefix was a 
*good*
thing, because I valued clarity above everything, and especially above
terseness. I understand the advantages of having commands named "sv" and
"chpst", but I believed, in my naïveté, that it wasn't a good idea for a
specialized package to tread on a large namespace; and to me the s6-
prefix would help users recognize exactly the domain of the command
they're using, and then they could abstract it away and focus on the
real command name.
Now you're saying that the s6- prefix *impedes* your pattern recognition
and detracts you from easily mapping the command name to its 
functionality;
that having it is worse UI than not having it. I had not heard this
before, but it quite makes sense.

The number of executables is a choice; I like to have more, smaller,
executables than less, bigger ones. One function, one tool. It makes
code easier to write; this is not really for historical reasons, it's a
design choice. Personally, it's easier for me to remember several
process state change command names than all the options to chpst.
whenever I use chpst, I always need to check the doc; when I use
something like softlimit or setuidgid, I may need to check the doc for
specific options, but I always remember which command I want and its
general syntax. So, I suppose it comes down to individual preference
there.

Would a generic "s6" command, that takes alternative syntax and rewrites
itself into "internal" commands, help? It could emulate runit syntax,
among other things.

s6 runsv ... -> s6-supervise ...
s6 sv ... -> s6-svc ...
s6 chpst ... -> various s6-prefixed process state change commands

My plan is for the future s6-frontend package to include such a
one-stop-shop command that controls various aspects of an s6 
installation,
but if this command can help with s6 adoption, I can work on it much
earlier than the rest of the s6-frontend functionality.

Or, if you have other ideas that could help with easier assimilation of
the s6 commands, I'm very open to suggestions.


>4) s6 seems more complex (hello execline!), and I don't (yet?) see any
>    benefit/feature I'd appreciate except minimizing wakeups.

This, on the other hand, is a misconception that really needs to
disappear. Understanding execline is *not needed* to run s6. s6 depends
on execline in two places (there were more, but I scrapped them because
nobody used the commands that were involved):
- at build-time, in s6-ftrig-listen
- at run-time, in s6-log, for processor invocation

Would entirely removing s6's dependency on execline help clear that
misunderstanding and help with s6 adoption? This could be made possible
by:
- duplicating el_semicolon() functionality in s6-ftrig-listen.c
(it's not elegant, but clearing the dep may be worth it)
- adding an alternative '?' processor directive to s6-log, that spawns
the processor using /bin/sh instead of execlineb. (The '!' directive
would still be there; processor invocations using '!' would just fail
if execline is not installed.)

I don't like this, but if "execline" is a scarecrow that keeps people
away from s6 for no other reason than perception, it's a possibility.
Savvy users will still install execline for use in run scripts.

s6-rc, however, absolutely cannot do without execline, since it uses
autogenerated execline scripts. But s6-rc is a different beast, that
requires a lot more involvement than s6 anyway, and that isn't needed
at all if we're just talking about runit-like functionality.

--
Laurent

  parent reply	other threads:[~2019-11-30 10:15 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 21:43 runit patches to fix compiler warnings on RHEL 7 J. Lewis Muir
2019-11-27 20:33 ` J. Lewis Muir
2019-11-28  7:59   ` Ben Franksen
     [not found]   ` <ecdf4d8f-93f6-3f9f-b84c-351fa91c7f02@uni-bremen.de>
2019-11-28 19:04     ` Laurent Bercot
2019-11-28 20:39       ` Steve Litt
2019-11-28 22:17         ` runit or s6 (was: runit patches to fix compiler warnings on RHEL 7) Laurent Bercot
2019-11-29 14:09       ` runit patches to fix compiler warnings on RHEL 7 Jan Braun
2019-11-29 21:46         ` Dewayne Geraghty
2019-11-30  1:22           ` Colin Booth
2019-11-30  0:21         ` Colin Booth
2019-11-30  3:14           ` Steve Litt
2019-11-30 13:32           ` Jeff
2019-11-30 13:46             ` Jeff
2019-11-30 10:15         ` Laurent Bercot [this message]
2019-11-30 14:32           ` s6 usability (was: runit patches to fix compiler warnings on RHEL 7) Jeff
2019-11-30 18:58             ` Laurent Bercot
2019-12-02 12:07               ` Jeff
2019-12-02 22:20                 ` Laurent Bercot
2019-12-02  2:47           ` Steve Litt
2019-12-02  3:37             ` s6 usability Dewayne Geraghty
2019-12-02 10:24               ` fungal-net
2019-12-02 21:32             ` s6 usability (was: runit patches to fix compiler warnings on RHEL 7) Laurent Bercot
2019-12-02 23:17               ` s6 usability Samuel Holland
2019-12-03 22:10                 ` Steve Litt
2019-12-21 11:49                   ` Jan Braun
2019-12-04 12:15                 ` Jonathan de Boyne Pollard
2019-12-04 21:02                 ` Laurent Bercot
2019-12-04  1:30             ` s6 usability (was: runit patches to fix compiler warnings on RHEL 7) Casper Ti. Vector
2019-12-21  9:26           ` s6 usability Jan Braun
2019-12-21 18:36             ` Guillermo
2019-12-21 21:19             ` Colin Booth
2019-12-22  1:05               ` Jan Braun
2019-12-22  8:30                 ` Colin Booth
2019-12-21 23:46             ` Laurent Bercot
2019-12-22  5:53               ` Jan Braun
2019-12-22 20:33               ` Steve Litt
2019-12-22 23:20                 ` Laurent Bercot
2019-12-23  1:28                   ` Oliver Schad
2019-12-23  9:14                     ` Laurent Bercot
2019-12-23 10:15                     ` Jonathan de Boyne Pollard
2019-12-24  0:18                       ` Oliver Schad
2019-12-23  1:57                   ` Steve Litt
2019-12-23  9:00                     ` Laurent Bercot
2019-12-22 23:47                 ` Dewayne Geraghty
2019-12-04 11:36         ` runit patches to fix compiler warnings on RHEL 7 Jonathan de Boyne Pollard
2019-12-04 16:40           ` J. Lewis Muir
2019-12-04 20:48             ` Laurent Bercot
2019-12-04 21:32               ` J. Lewis Muir
2019-12-04 21:06             ` Steve Litt
2019-12-04 21:50               ` Laurent Bercot
     [not found]                 ` <20191205132736.7f501460@puter>
2019-12-08 19:10                   ` Laurent Bercot
2019-12-02 17:57       ` J. Lewis Muir
2019-12-02 21:06         ` J. Lewis Muir
2019-12-02 22:22           ` Laurent Bercot
2019-12-02 21:58         ` Laurent Bercot
2019-12-03 10:57           ` Benjamin Franksen
2019-12-04 10:43       ` Jonathan de Boyne Pollard
2019-12-02 17:13     ` J. Lewis Muir
2019-12-04 11:13       ` Jonathan de Boyne Pollard

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=em05e63d7b-23a0-41fe-88d1-c3c509f943e4@elzian \
    --to=ska-supervision@skarnet.org \
    --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).