supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Guillermo <gdiazhartusch@gmail.com>
To: supervision <supervision@list.skarnet.org>,
	skaware <skaware@list.skarnet.org>
Subject: Re: s6-rc user services on Gentoo
Date: Tue, 2 Apr 2024 17:57:53 -0300	[thread overview]
Message-ID: <CADQ2Nw9furje635_Vdpws29Byqf0kajebZm0ceBS_kAbTm8ZQQ@mail.gmail.com> (raw)
In-Reply-To: <87jzlgnzoh.fsf@gmail.com>

Hello,

El mar, 2 abr 2024 a las 1:42, Alexis escribió:
>
>   S6RC_SERVICE_REPO=${HOME}/src/srht/gentoo-overlay/sys-apps/s6-rc-services/files/
>
> * The above directory contains two service directories:
> ** dbus-session-bus/, containing:
> *** type: longrun
> *** notification-fd: 3
> *** producer-for: dbus-session-bus-log
> *** run:
>     #!/usr/bin/execlineb -P
>     importas HOME HOME
>     redirfd -w 4 ${HOME}/.env.d/DBUS_SESSION_BUS_ADDRESS
>     dbus-daemon --session --fork --nopidfile --print-address=4

You already got an answer about why s6-rc-init doesn't work (the scan
directory and the directory of service definitions given to
s6-rc-compile should not be the same; let s6-rc-init populate the
service directory). I'd like to comment on what you didn't ask :)

1) Why are you telling dbus-daemon to --fork? That defeats the purpose
of service supervision. The service definition for the system-wide
message bus that I have on a Gentoo VM of mine with s6 + s6-rc +
s6-linux-init uses --nofork.

2) The presence of a notification-fd file tells s6 that dbus-daemon
can be somehow coerced into producing an s6-style readiness
notification using file descriptor 3 without changing its code, are
you sure that's the case with this script? My service definition for
the system-wide message bus polls for readiness using s6-notifyoncheck
and a dbus-send command...

> [a] The current s6 and s6-rc pages on the wiki have lot of detail,
> without any "quickstart" tutorials that might make it easy for
> people to get on board.

Most of the content is from around 2017, a time in which the s6 suite
was less known, information in places other than the skarnet.org
website was lacking and inaccurate —despite official documentation,
while being short and to the point, has always been quite good and
complete IMO; it seemed people just didn't bother reading it? [1]—,
and there weren't many usage examples around.

[1] I think I never said it, but what made me look at s6 for the first
time (s6-rc and s6-linux-init didn't exist back then), after seeing a
post in the Gentoo forums, was its documentation ("OK, nice
explanations, let's try this").

  parent reply	other threads:[~2024-04-02 20:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02  4:42 Alexis
2024-04-02 10:44 ` Hoël Bézier
2024-04-02 23:44   ` Alexis
2024-04-02 20:57 ` Guillermo [this message]
2024-04-03  0:12   ` Alexis
2024-04-03 11:37   ` Laurent Bercot
2024-04-06 12:43     ` Guillermo
2024-04-06 13:57       ` Laurent Bercot
2024-04-06 15:57       ` Muhammad Mahendra Subrata
2024-04-06 18:31         ` Laurent Bercot

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=CADQ2Nw9furje635_Vdpws29Byqf0kajebZm0ceBS_kAbTm8ZQQ@mail.gmail.com \
    --to=gdiazhartusch@gmail.com \
    --cc=skaware@list.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).