Gentoo Archives: gentoo-dev

From: Daniel Campbell <zlg@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Changing order of default virtual/udev provider
Date: Tue, 09 Feb 2016 14:44:42
Message-Id: 56B9FB52.3040100@gentoo.org
In Reply to: Re: [gentoo-dev] Changing order of default virtual/udev provider by Rich Freeman
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA256
3
4 On 02/09/2016 05:44 AM, Rich Freeman wrote:
5 > On Tue, Feb 9, 2016 at 8:06 AM, Daniel Campbell <zlg@g.o>
6 > wrote:
7 >>
8 >> Perhaps that's because each of those things should not actually
9 >> be considered the same object type. That sort of design may be
10 >> convenient to users, but is more akin to treating everything like
11 >> a nail when you have a hammer.
12 >>
13 >> Also note that in the 'alternate' model, each of the above is
14 >> handled by a different tool. It's obvious that using a
15 >> combination of different tools will result in different
16 >> conceptualizations of each of those parts in a system. I see
17 >> little benefit in a single project pretending to understand
18 >> everything about each of them.
19 >
20 > I thought the whole beauty of unix was the everything-is-a-file
21 > design?
22
23 Isn't there a bit more to it than that? We can take any design idea,
24 apply it to an extreme, and see where it won't work. Plan9 is a 'more
25 proper UNIX' and somehow does a bunch of things exclusively through
26 the filesystem. I think that design can be great for some things. For
27 a lot of the above, even the disparate set of tools interfaces with
28 files. `crontab -e` edits a file, device nodes have been in the
29 filesystem for forever, mounts have historically been managed by fstab
30 and need a place in the filesystem to mount, etc.
31
32 The primary difference here is systemd throws it into one directory
33 tree instead of multiple. Systemd is great if you agree with the
34 design decisions made. That's the problem/benefit with both
35 approaches. If you go with systemd, you have to like or agree with
36 every change they make or every design decision on everything. With
37 multiple tools, you can pick and choose. If I don't like my cron
38 implementation, I can swap it out with another one. If I was with
39 systemd and didn't like it, I'd have to recompile systemd to remove
40 the feature (assuming it's not required like logind), and replace it
41 with a standalone cron service, managing it with systemd. I could be
42 lazy and leave systemd running and just add the cron service, but that
43 would needlessly complicate things and may end up doubling cronjobs.
44
45 Politics aside, the dichotomy caused by systemd comes down between
46 groups of people that either don't care about their lower level system
47 (or agree with its design) and people who either disagree with
48 systemd's design and/or want to be able to swap things out when they
49 get pissed at the way one component is acting. Systemd is an
50 all-or-nothing choice, and among a population that fiercely values
51 choices, that can understandably make them concerned. That said,
52 systemd still deserves to be treated as a choice.
53
54 >
55 >>
56 >> If I didn't know any better I'd say this reads like shilling.
57 >> Firstly, there's a real problem if you're depending on a daemon
58 >> restarting itself. Why is it stopping in the first place? If it's
59 >> stopping, something wrong is happening and restarting it *isn't*
60 >> going to fix it.
61 >
62 > Sure, but then why does the linux kernel have an option to
63 > auto-reboot after a panic? Surely it is better if there is a
64 > kernel panic to just leave the server down for a few days until an
65 > admin shows up to debug the kernel?
66
67 I see where you're coming from, but there are situations where you
68 really *do* want that server to stay down. What sort of data is on
69 that server? What purpose is it fulfilling? If it's a webserver, its
70 failure will be obvious, immediately apparent, and odds are someone is
71 on-call to manage it. If you're holding important data like a
72 government agency, you likely have someone on-call as well, but do you
73 want a compromised server rebooting continuously as a cracker or some
74 other entity is trying to take advantage of a kernel bug? The correct
75 course of action there is to let it fail, get your staff to the
76 machine, isolate it from the network, and start triaging.
77
78 There are still cases where I suppose you'd want auto-reboot, but I
79 can't imagine they'd be the correct answer for the problem at hand.
80 >
81 >>
82 >> Existing permission systems handle a lot of cases. *kit (logind,
83 >> is more like it) has some extra things to make it a bit more
84 >> granular. It's mostly unneeded complexity. The biggest benefit
85 >> logind brings to a system is multi-seat capability.
86 >
87 > Emphasis on "existing permission systemS" - again you're comparing
88 > a patchwork of different solutions to a problem vs a harmonized
89 > solution.
90
91 It's more like "which would you like to use?" Using them in tandem is
92 asking for issues, but generally the sudoers file itself and a few
93 groups can handle that for you, or acls, or (maybe?) LDAP. There's
94 many ways to skin that cat.
95 >
96 >>>
97 >>>> And a lot of Gentoo is surprisingly simple: Like our use of
98 >>>> bash scripts for recipies to build things, like using rsync
99 >>>> to deploy/relay not just those recipies, but security notices
100 >>>> and news items, which are themselves reasonably simple
101 >>>> formats.
102 >>>
103 >>> Well, one thing about Gentoo that certainly isn't simple is
104 >>> our init.d scripts.
105 >>>
106 >>> Compare this: http://pastebin.com/sSDtpF4t
107 >>>
108 >>> With this: http://pastebin.com/Lfn8r7qP
109 >>>
110 >>> Systemd does the job in 10% of the code (and half of it is a
111 >>> comment), and doesn't implement its own service polling and
112 >>> killer script during shutdown independently for every service
113 >>> (not that every init.d script even does this - most of them
114 >>> will just leave orphans behind, and systemd will catch orphans
115 >>> that even the lengthy init.d script for apache misses).
116 >>
117 >> This is a dishonest comparison. You're comparing a declarative
118 >> configuration file with a Turing-complete scripting language.
119 >
120 > That is how each solution implements its configuration. It isn't
121 > my fault that openrc forces everybody to write bash scripts just
122 > to start/stop a single process.
123 >
124 > The complexity of openrc is inherent in the design.
125 >
126 > Sure, systemd has more lines of code internally, but the difference
127 > is that instead of having a bazillion independent bash scripts
128 > maintained by different people at different levels of QA, you have
129 > a single codebase that almost all distros share that is maintained
130 > to a higher level of QA. Features are implemented once there
131 > instead of a million times in various shell scripts.
132
133 And that's where something like eclasses (but for rc scripts) could be
134 used to consolidate all the redundancy. As far as I can tell we
135 already implement something similar with the built-in functions that
136 rc scripts are expected to have. The thing is, do we want to go in the
137 direction of declarative files and the limitations that come with
138 that? The complexity would then have to be migrated to the daemon
139 manager itself instead of the scripts. No matter how you look at it,
140 managing daemons is non-trivial and rather complex. Most people aren't
141 going to touch unit files *or* rc scripts unless they're developers,
142 and most developers will read documentation. If anything, a developer
143 will have more control over how their daemon is handled in the rc
144 script. They would have to read systemd's C code or its plethora of
145 unit options to set it up 'just right' to achieve the same.
146
147 Even that will have different tastes across the board. Some developers
148 want complete control, so they'll want to build their own script.
149 Others don't care or don't mind integrating with something and
150 providing a configuration file.
151 >
152 >>
153 >> I can get behind that. This dodges all sorts of arguments
154 >> regarding initial installations. There's still the issue of the
155 >> virtual, however; would we add sys-fs/udev to p.mask in
156 >> non-systemd profiles to clarify the decision, or make eudev the
157 >> default choice in the virtual? I think we can all agree on making
158 >> it an additional step in the handbook, but the default is still
159 >> at hand.
160 >
161 > I agree, but it becomes a less important default, like whether you
162 > prefer vi/emacs to nano.
163
164 That may be the case once it's covered in the handbook, but in the
165 future we already know the systemd team does not intend on maintaining
166 udev-sans-systemd forever.
167
168 >
169 >>>
170 >>> If you want to talk about default providers, the most
171 >>> straightforward one to use is systemd. It is what people are
172 >>> going to be used to coming from other distros, it is what every
173 >>> upstream package expects to be running anyway, and it is the
174 >>> simpler tool that does everything that most people want.
175 >>>
176 >>> For people who want a more exotic configuration, there are
177 >>> alternatives, and Gentoo should certainly support using them
178 >>> as long as people care to maintain them.
179 >>
180 >> This is the same argument other distros used before they
181 >> switched completely to systemd. When has Gentoo ever been about
182 >> marching to the beat of other distros? Are you advocating for
183 >> following what others do simply because it's popular?
184 >
185 > Gentoo has always been like other mainstream distros (until Arch
186 > came along it was probably closest to Debian). Its distinctiveness
187 > came from offering choices to users and being source-based. I
188 > think that is what we're good at.
189 >
190 > The only reason we had OpenRC is that EVERYBODY was rolling their
191 > own service managers, and OpenRC was better than the alternatives.
192 > I think that was great, but everybody else has moved on.
193
194 Do you consider OpenRC a project that's not useful anymore?
195 >
196 >> The e-mails I've seen from you in this thread seem out of the
197 >> ordinary. Has the systemd team been talking with you, or people
198 >> from other distributions urging for Gentoo to switch?
199 >
200 > Not at all.
201 >
202 > I'll admit this has been a bit of an emotional thread for me. I
203 > think my frustration comes from the fact that it seems like the
204 > whole reason that eudev exists is because people really strongly
205 > believe that systemd isn't the right way to go, and yet those same
206 > people don't seem to realize that others might feel just as
207 > strongly that eudev isn't the right way to go.
208 >
209 > Surely anybody suggesting switching to eudev as the default
210 > virtual/udev provider had to have realized that this would create
211 > a huge controversy.
212
213 Would it, really? I think it's hard for us to say, which is why I
214 suggested getting a rough idea from our users, somehow. The people who
215 don't care won't notice anything, and the people who do care will know
216 how to mask eudev.
217
218 It's possible that eudev isn't the way to go. But we at least know
219 that there are no plans for it to be absorbed by a parent project.
220 That said...
221
222 >
223 > Even if standalone udev is a dead-end (something that is
224 > speculation at this point), it isn't like the code that exists
225 > today will suddenly stop working. Worst case we just have to
226 > change the default at a later point in time.
227 >
228 > Even just kicking the can down the road has a lot of advantages: 1.
229 > Everything works fine today. 2. We don't know for sure that it
230 > will ever stop working. 3. Deferring a decision means we don't
231 > have to wage a huge battle over which way the decision ought to
232 > go. 4. If we do have to make a decision in the future, we'll have
233 > more information to act on.
234 >
235
236 It's not really speculation. [1] [2] You're right, though. We could
237 keep sys-fs/udev around, at an older version, until it just stops
238 working. That would likely take months, since udev's core
239 functionality really hasn't changed in years. Rules you wrote 6 years
240 ago will probably still work.
241
242 I can get behind deferring the decision, but if we were to make it,
243 knowing the systemd team's plans for the future and the current state
244 of the virtual (depending on the systemd flag), it makes more sense to
245 default to eudev, since you have to have '-systemd' to trigger either
246 of them.
247
248 [1]:
249 https://lists.freedesktop.org/archives/systemd-devel/2014-May/019657.html
250 [2]:
251 https://lists.freedesktop.org/archives/systemd-devel/2014-May/019664.html
252
253 Unfortunately I could not find more links. I recall seeing a ML
254 posting from Poettering where he indicated separate udev would not be
255 supported perpetually. I'm not the best at searching the Web so I
256 couldn't find it.
257
258 - --
259 Daniel Campbell - Gentoo Developer
260 OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
261 fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6
262 -----BEGIN PGP SIGNATURE-----
263 Version: GnuPG v2
264
265 iQIcBAEBCAAGBQJWuftQAAoJEAEkDpRQOeFwQooQAKyp6KmeyUCffTON9H+Hhw8g
266 swqddfxkBo+QVa2yhdGDqPe8NaHSMZ7KdcW/2f+V/4YOUntYkchs346czSPlYm1P
267 559+8jrVsHflLUO5hCB5SlFtdwNy4a+tWWObOej5yk+b+O6PuORlsTL+UZ4K3YUg
268 bDGF/CG6FLxH8iSocZFpBMxbjgxNioSzHjIBTfdvYf2kXK6bF5vdFaAGGu1bs8/g
269 Utaz/PJDG7XtkgKUZq87B3xl2Dy4tjDwRDHGsricGvHW0byaovrBJ/+N8gJ9JAL0
270 /WubGP20clOmDo6cq0CIXkx6DcqOa8MW44r0CPIxfkFhxI192+KznmfJjlO67kEL
271 Xuk+fLkNIBJB89Y09ZkTex9aM96ZJ/eXcU/VdJQ00Dteun/7iKBSto5stgXRi/po
272 Xu5LHJxsuL7XHsgo3sl0vkJwVcv87gQZZn4faeV/R9+pUawS034EzV5yg979IZUl
273 7CDJ69Ei0kS7sYY+oDv7wZcyLxTqD02btQ33W7LI3HlPwu7zoPziO99H3m9jtctN
274 +QPSX5lRt2jAMzhJbBLGHBgs0QIZbMjhQNLUGQNm4cO6JKqOvfYT4a8v5G1d8bO/
275 6YUUynVxNtTIWnf/h6ap1Znd7dSaveKM02tmPa04o37McOhyTybt8msvg+LhgYO9
276 XfnFlRggdBPxwvLeFBFg
277 =8Jxb
278 -----END PGP SIGNATURE-----

Replies