Gentoo Archives: gentoo-user

From: Mark David Dumlao <madumlao@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Debian just voted in systemd for default init system in jessie
Date: Mon, 24 Feb 2014 14:33:40
Message-Id: CAG2nJkMm8h=3OxxdmXm0yMoAhQDqLHFSRHDKEA0Mxc43GhDEyA@mail.gmail.com
In Reply to: Re: [gentoo-user] Debian just voted in systemd for default init system in jessie by "Yuri K. Shatroff"
1 On Mon, Feb 24, 2014 at 9:42 PM, Yuri K. Shatroff <yks-uno@××××××.ru> wrote:
2 >
3 >
4 > 24.02.2014 16:39, Mark David Dumlao пишет:
5 >
6 >> On Mon, Feb 24, 2014 at 3:11 PM, Yuri K. Shatroff <yks-uno@××××××.ru>
7 >> wrote:
8 >>>
9 >>> 24.02.2014 02:32, Alan McKinnon wrote:
10 >>>>
11 >>>> [1] For lack of a better term, let's just call systemd here a "system
12 >>>> controller". What is this ONE thing a system controller should do and do
13 >>>> it well?
14 >>>
15 >>>
16 >>>
17 >>> An init daemon generally does one thing well.
18 >>
19 >>
20 >> it's obvious you haven't thought this through.
21 >>
22 >> consider, for a moment, that the "one thing well" that an init daemon
23 >> is supposed to do is
24 >> "run programs that do arbitrary things to get the system to an arbitrary
25 >> state".
26 >>
27 >> do you not see a problem?
28 >
29 >
30 > No. As you say, ``an init daemon is supposed to do is "run programs``, until
31 > here you're right, but then you start talking about things the init doesn't
32 > do but the programs do. In your wording, an init daemon is also a DBMS, an
33 > MTA, a network startup daemon, a firewall, a getty and whatever program runs
34 > on the system.
35
36 Let's try to talk you through to a soft landing here.
37
38 When we say init, are we just referring to pid 1, or are we referring
39 to something
40 else entirely?
41
42 OpenRC is often spoken of in the same breath as systemd, as if they were
43 the same kind of thing. That sounds fair but think about it for a second:
44
45 openrc - as most people talk about it - isn't even pid 1. as most people
46 talk about it, openrc includes the functions.sh, the net.eth0 scripts,
47 the script
48 for starting your /sys, /proc, mounting local and network filesystems, setting
49 the hostname and so on.
50
51
52 They may be written in a different language from pid1, but when people
53 talk about
54 openrc, they are talking about that whole ball of wax. From a systems
55 perspective - they're parts of the same thing.
56
57 Even discounting the parts that you think are ridiculous, like databases and
58 loggers, there are clearly more parts in there above than can be cleanly defined
59 as "one thing".
60
61 Who gets to decide which is the "one thing" or not? You? Don't you rely on
62 openrc to set your hostname? Load your kernel modules? Run your sysctl?
63 Set any miscellaneous options in /sys? Mount your filesystems?
64
65 Go ahead, define for everyone, once and for all, what this "one thing" is.
66
67 Does this one thing init include a subsystem for reading separate
68 environment files per-service? Isn't this just feature creep? Can't you just
69 edit the init scripts to add those in? I mean, they are already
70 scripts after all.
71 And they're in /etc, they're meant to be configured.
72
73 Does this one thing include service dependencies? Why sysv has gone for
74 a LONG time without them, just a sequencing, and that works fine for almost
75 all cases anyways. Isn't this just feature creep? Can't you just edit the init
76 scripts to start any dependent services?
77
78 Point is - go look at any arbitrary feature that's part of your "init
79 system" and
80 you could cry to hell and high water that it's violating the "one
81 thing", whatever
82 that "one thing" is that doesn't seem to be defined.
83
84 At least with systemd the parts are cleanly split off into separate executables.
85 Yes, it's technically not needed for pid 1 to create tempfiles for
86 other programs.
87 That's why systemd-tmpfiles is its own tiny program, that does one "one thing"
88 (create tempfiles for other programs) and nothing else. Yes, it's technically
89 not needed for pid 1 to check your filesystems. That's why systemd-fsck is
90 once again, a separate utility, that does "one thing" (run fsck) well. Yes,
91 it's technically not needed for pid 1 to remount your filesystems readwrite.
92 Again there's a separate utilty for that, that does nothing but just that.
93
94 It's clear to me that there's an analogue between the different parts of a
95 full openrc system - that just happen to be implemented in scripts - and
96 the different parts of a systemd system - that just happen to be implemented
97 in small binaries.
98
99 Every time people complain about systemd having too many features,
100 they just _casually_ forget to mention that, for instance, their init actually
101 asks them if they want to run interactive (why do that when you can specify
102 from the boot loader?) or checks the configuration files of their daemons
103 to see if they're valid and prompts the user to config if not. They just
104 _casually_ fail to mention that their init has plugins for NetworkManager
105 and ifplugd, that it comes with scripts for setting the consolefont.
106 Meanwhile systemd does those same things, and it's bloated, theirs
107 isn't.
108
109 Oh you're going to say that that's not fair, it's external optional stuff,
110 it's not _really_ part of openrc, but that's not intellectually honest is it?
111 Heck, I could do that same. I could control my bootup process so that
112 I run my own stuff instead of systemd-fsck, systemd-tmpfiles,
113 systemd-mount and all that jazz and run plain old init scripts in their
114 place.
115
116 Why bother?
117
118 The reality is that - init scripts don't do just one thing, and don't even
119 do it well.
120 --
121 This email is: [ ] actionable [ ] fyi [x] social
122 Response needed: [ ] yes [ ] up to you [x] no
123 Time-sensitive: [ ] immediate [ ] soon [x] none

Replies

Subject Author
Re: [gentoo-user] Debian just voted in systemd for default init system in jessie "Yuri K. Shatroff" <yks-uno@××××××.ru>