Re: anopa 0.2.0

From: Steve Litt <slitt_at_troubleshooters.com>
Date: Wed, 12 Aug 2015 08:37:05 -0400

On Wed, 12 Aug 2015 13:50:19 +0200
Olivier Brunel <jjk_at_jjacky.com> wrote:

> Hi Steve,
>
> On 08/11/15 20:40, Steve Litt wrote:
> > On Tue, 11 Aug 2015 19:58:59 +0200
> >
> > Hi j,
> >
> > I just got done reading http://jjacky.com/anopa/ .
> >
> > I love the inclusion of the needs directory, as well as directory
> > after.
> >
> > I love the way you distinquish one-shots from long-run by whether
> > your script is start or run.
> >
> > Reading http://jjacky.com/anopa/ , it seems like all the one-shots
> > are run by PID1, whereas all the long-runs are run by s6. Does this
> > mean that all one-shots must be run before the first long-run? If
> > so, I think that's a too-strict restriction. If not, Anopa + s6
> > sounds tremendously encouraging.
> >
> > So, does Anopa give one a way of running a long-term before a
> > one-shot?
>
> Of course. oneshots are run as children of aa-start, which on usual
> fashion during boot would happen from stage2 (aa-stage2 that is).
> Basically this is how it goes:
> - you use aa-stage1 as init, so it will be your PID1 on boot. It will
> fork & exec aa-stage2, which will block using the trick Laurent
> described in s6 doc.
> - back in PID1, we exec into s6-svscan, which will then start the
> catch-all logger, thus unblocking aa-stage2
> - aa-stage2 will then exec aa-start, where oneshots & longruns can be
> started in any required order; so oneshot services can require for
> longrun services to be started, or ready, before they're started.
>
> Cheers,
> -j

Thanks j,

I couldn't *precisely* visualize your answer, but one thing came
through loud and clear:

===========================================
"where oneshots & longruns can be started in any required order; so
oneshot services can require for longrun services to be started, or
ready, before they're started."
===========================================

This is *exactly* what I was hoping to hear. It sounds to me like
theoretically anopa plus s6 will be a much better alternative than
Suckless Init plus daemontools-encore[1] plus LittKit
(http://troubleshooters.com/linux/diy/suckless_init_on_plop.htm), and
because it can intermix one-shots and long-runs[2], better than runit.
I'll be trying it out very soon. If it's what I think it is, I've been
waiting a long time for something like anopa plus s6.

[1] With a few changes to LittKit, you can use s6 instead of
daemontools-encore

[2]: I know it's likely I'll never need to run a one-shot *after* a
long-run, but I want to have that capability. Runit doesn't give me
that capability.

Thanks,

SteveT

Steve Litt
August 2015 featured book: Troubleshooting: Just the Facts
http://www.troubleshooters.com/tjust
Received on Wed Aug 12 2015 - 12:37:05 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC