Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] rfc: openrc service script dependency checker
Date: Fri, 05 Dec 2014 12:36:54
Message-Id: CAGfcS_kJUOQEdELw56GCJyLpmxHwNHx8G6cUYR7F7D8bzHAmGw@mail.gmail.com
In Reply to: Re: [gentoo-dev] rfc: openrc service script dependency checker by Andrew Savchenko
1 On Fri, Dec 5, 2014 at 3:25 AM, Andrew Savchenko <bircoph@g.o> wrote:
2 >
3 >> I didn't ask why we need local.d. I asked why we need to run it LAST,
4 >> and why we need to run all of that other stuff LAST? Of course, the
5 >> reality is that we aren't running all of that stuff last since exactly
6 >> one script can REALLY be run last.
7 >>
8 >> If your answer is that something in local.d might need to use the
9 >> network, then specify that it needs the network. If the answer is
10 >> that it needs to use nfs, then specify that it needs to use nfs. If
11 >> it needs to happen after a bunch of random things but you can't be
12 >> sure which things they are, then just create a virtual service and
13 >> make it need that.
14 >>
15 >> The solution is the same for both local.d and all that "other stuff"
16 >> that "needs to be last." Just specify what they actually need. This
17 >> is a dependency-based service manager.
18 >
19 > This will require every sysadmin to know well how openrc works and
20 > how to specify appropriate dependencies for custom out-of-tree
21 > daemons. While I support the idea that sysadmins should be well
22 > prepared to tweak internals of systems they are working with — and
23 > to know this internals well in order to do such tweaks —, in real
24 > life people often don't have time to dig such deep into the system
25 > and will prefer other solutions which keeping stuff simple.
26 >
27 > local.d where people can just put their scripts without handling
28 > any deps is a simple way. That's why we need it. (Of course if
29 > someone dislikes this approach, it not hard to disable local.d
30 > at all.)
31 >
32 > And if local.d needs dependencies to be specified how does it
33 > differs from just writing plain new service and putting it into
34 > init.d? Frankly, I do such things when I need custom complicated
35 > services for my needs.
36 >
37
38 There is mention here that there are many scripts that are set to run
39 last, not just local.d. You haven't addressed those.
40
41 For local.d it seems reasonable to just have a default config that
42 makes it run after network and mounts. Or maybe make local.d and
43 allow that alone to run last. You can have one thing run last.
44
45 --
46 Rich