supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* where is the right place to run s6-rc from ?
@ 2019-05-19 21:23 Jeff
  2019-05-19 23:12 ` Laurent Bercot
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff @ 2019-05-19 21:23 UTC (permalink / raw)
  To: supervision


i wonder whether s6-rc (or any other service manager or startup script)
should be started from within the supervision tree directly as
service (dir) in the scandir ?

let us assume we created a service dir "rc" or so in the otherwise
unpopulated scandir (except required loggers).
it starts s6-rc (or another service manager) from its run script and
execs into "pause" or something similar that just pauses until killed.
that way it is possible to associate a log service with said "rc" service
and when "pause" exits the service manager can be called from the "finish"
script to bring down the other services correctly
(dunno if this script's output will be logged),
in this case shutdown would just mean to stop the "rc" service.

of course it would be more natural to make this very service run only
once via the "once" file. but i guess such "once" services cannot have
an associated logger, right ?

another hack would be to make this once service write its output to a
fifo that is read by another logging service, could this be s6-svscan's
own catch-all default logger ?

but when using such a catch-all logger to log s6-svscan's own output
there is no need for the "rc" service to have its own logger since
everything it outputs goes into this catch-all logger.

in case of a run-once service s6-rc would be called from s6-svscan's
signal handler scripts again to bring down services.

why not ? apparently a good idea ...



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: where is the right place to run s6-rc from ?
  2019-05-19 21:23 where is the right place to run s6-rc from ? Jeff
@ 2019-05-19 23:12 ` Laurent Bercot
  0 siblings, 0 replies; 2+ messages in thread
From: Laurent Bercot @ 2019-05-19 23:12 UTC (permalink / raw)
  To: supervision

>but when using such a catch-all logger to log s6-svscan's own output
>there is no need for the "rc" service to have its own logger since
>everything it outputs goes into this catch-all logger.

That's the end goal. That's what s6-linux-init-1.0.0.0 does.
What you call the "rc" service is named "runleveld" in s6-linux-init,
and it is just a service spawning a "s6-rc -pu change" process with
the argument you give to the telinit command. Its output naturally
goes to the catch-all logger.

Manual invocations of s6-rc are of course possible, in which case
the output will go to the user's terminal. runleveld is only
involved at boot time (well, not really, but the "runlevel" script,
that invokes the service manager, is spawned with the same
environment) and shutdown time, and on telinit invocation.

--
Laurent



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-19 23:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-19 21:23 where is the right place to run s6-rc from ? Jeff
2019-05-19 23:12 ` Laurent Bercot

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).