supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Ihor Antonov <ihor@antonovs.family>
To: Laurent Bercot <ska-supervision@skarnet.org>
Cc: supervision@list.skarnet.org
Subject: Re: s6-rc user experience question
Date: Mon, 17 Oct 2022 08:43:28 -0700	[thread overview]
Message-ID: <20221017154328.xcf35bdlabow6bjo@localhost> (raw)
In-Reply-To: <em65561c96-25a9-4012-8d1b-88060c37b61d@56081f05.com>

On 2022-10-17 13:11, Laurent Bercot wrote:
> 
>  No, because these are operations that are ideally done at different
> times.
>  - Compilation happens "offline", before you (re)boot the machine.
>  - s6-svscan is run independently from s6-rc, typically very early
> during the boot sequence. (Ideally it's process 1.) In any case the
> preexistence of a supervision tree is assumed by s6-rc, so spawning
> one as part of an s6-rc command isn't good workflow.
>  - Initialization happens when the service manager is ready to run,
> which means when the machine is online and already has an s6-svscan
> running.

I understand that these tools are executed at different times and we
want to make long-lived daemons as small as possible, that only do one
job. Perhaps a higher-level orchestration tool(s) is/are needed, that
will accomplish most typical workflows like:

- make changes in source -> complie -> switch symlink to latest compiled snapshot ->
  s6-rc-update. In systmd world this is easier: edit -> systemd
  daemon-reload

- list running services, start/stop them etc.

- auto-generating cooresponding logger service for a service. Today it
  is mostly a copy-paste job and incompatible with vanilla svcscan
  ./log/run subdir approach, which is confusing on its own.


Another set of reasons for a high-level utility is better UX:

- today users have to interact with multiple binaries and remember all
  their names, cli flags and positional parameters.

- there are no manual pages that would help with the point above, and
  short help messages are not very useful. ( I often resort to reading 
  https://skarnet.org/software/s6 from my browser )

- CLI interface of those binaries is not very intuitive, and there are
  no long options to improve readability in scripts. 
  Example: It is very hard to remember what this actually means
  
        s6-log -d3 -- t s16777216 n64 /var/log/mysvc

  I would much prefer something like this for all utilities, in
  addition to short options

        s6-log --notification-fd 3
               --num-files 64
               --filesize 16777216
               --timestamp tai64
                /var/log/mysvc


If changing CLI interface of s6 toolchest is not something that you
consider then a higher-level orchestration tool can take away some these
pains

>  However, there's a change I can make that would immediately improve
> s6-rc's usability: since it's largely a perception issue, changing
> the vocabulary from "s6-rc-compile" to "s6-rc-snapshot" and
> "compiled database" to "opaque snapshot of the set of services" would
> be a good idea. It would spook fewer people, and send fewer people
> into red herring trains of thoughts. :)

If compiled snapshot was an opaque file, instead of a directory that
would indeed make the perception a bit better

  reply	other threads:[~2022-10-17 15:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16  6:28 Ihor Antonov
2022-10-16 10:39 ` Laurent Bercot
2022-10-16 16:02   ` Ihor Antonov
2022-10-17 13:11     ` Laurent Bercot
2022-10-17 15:43       ` Ihor Antonov [this message]
2022-10-17 21:32         ` Laurent Bercot
2022-10-18  1:13         ` Alexis
2022-10-18  3:14           ` Ihor Antonov

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=20221017154328.xcf35bdlabow6bjo@localhost \
    --to=ihor@antonovs.family \
    --cc=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).