|
|
Subscribe / Log in / New account

Debian reconsiders init-system diversity

Debian reconsiders init-system diversity

Posted Nov 13, 2019 20:45 UTC (Wed) by HenrikH (subscriber, #31152)
In reply to: Debian reconsiders init-system diversity by mezcalero
Parent article: Debian reconsiders init-system diversity

I think those things are voiced by people who #1 are not developers themselves (so comes with the added "how hard can it be" and #2 from this strange notion that systemd the name itself have become tainted in their minds so the code just have to be rewritten...

I know that you don't get to hear this enough Lennart, but from me and the whole team of developers and admins where I work, and from the bottoms of our hearts: Thank You! The world in where both pulse and systemd exists is a better and brighter one.


to post comments

Debian reconsiders init-system diversity

Posted Nov 13, 2019 21:14 UTC (Wed) by mezcalero (subscriber, #45103) [Link]

Thank you! 💖

Debian reconsiders init-system diversity

Posted Nov 14, 2019 4:17 UTC (Thu) by rra (subscriber, #99804) [Link] (3 responses)

Speaking as the person who has made this argument, I'm making a somewhat different point that I think is being missed.

Replacing sysvinit with something better was quite difficult because there actually wasn't a single implementation of "sysvinit." It was more of an idea than a program. There was a giant ecosystem of random shell scripts and utilities and conventions and tools that parsed comments to discover ordering and a mess of problems that were solved and resolved by every package or every distribution independently (creating users, creating temporary directories, and so forth). The transition was therefore quite painful because it wasn't replacing one package with another, it was replacing a bunch of quite hairy and undocumented components with truly esoteric behavioral interactions and wildly varying implementations across distributions with a standardized set of configuration files and implementations largely shared across distributions.

I understand that some folks are not happy that this has happened, but this is largely what has happened, whatever one's feelings about whether it was a good idea.

Like systemd or not, what it's done is turn a bunch of ad-hoc, tiny programs in a full if irritating programming language into an API based on configuration files that clearly specifies what a particular program wants to have happen. This is huge, because (as someone else pointed out earlier in the comments) this makes replacing systemd far, far easier, should anyone really want to do it, than replacing sysvinit.

The point that I am trying to make is that if you believe in init system diversity, the path forward is not back to an ad hoc mess of shell scripts. This makes no sense to anyone who comes at the problem from the outside. The path forward is to recognize that systemd is giving you a great gift, namely an implementation-agnostic API which you can reimplement in a way that's transparent to the consumer of that API and then add your own unique spin to.

I'm trying to get init system diversity supporters to realize that a standardized API is a *boon* to their cause, not some sort of nefarious attack on it, because standardized APIs are exactly what permit multiple competing implementations, and because there's nothing in the API that forecloses any of the things that folks who don't like systemd are arguing for. You can implement that API perfectly well with a variety of independently-developed programs that do only one piece of the problem, for instance.

Full credit to Lennart and the rest of the systemd team for the work that they've done, but another team of people absolutely could write a new implementation of that API from scratch and possibly even do it better. It's just months and months and months of work. I agree with the idea that, all things being equal, taking advantage of the properties of free software and forking systemd rather than starting from scratch and writing all new bugs would make a lot of practical sense. But everyone reading this certainly knows that free software developers aren't necessarily practical, and sometimes that's one of the wonderful things about our community. For example, I fully expect someone to eventually write a new init system in Rust just because they can, and there's no obvious reason to start such an effort by forking systemd.

But there is an obvious reason to start that effort by implementing systemd's configuration API. Because that's what makes diversity actually practical.

Debian reconsiders init-system diversity

Posted Nov 15, 2019 5:35 UTC (Fri) by ncm (guest, #165) [Link]

This, anyway, we ought to all be able to agree on. Whatever you want to use to manage system processes, unit files are a good, clear idea well executed. I have doubts about the design of dbus, but the unit files are a triumph of economically coherent design.

Debian reconsiders init-system diversity

Posted Nov 19, 2019 23:40 UTC (Tue) by rgmoore (✭ supporter ✭, #75) [Link] (1 responses)

There was a giant ecosystem of random shell scripts and utilities and conventions and tools that parsed comments to discover ordering and a mess of problems that were solved and resolved by every package or every distribution independently (creating users, creating temporary directories, and so forth).

To put this slightly differently, the biggest problem with SysV init is that it fails to separate policy from mechanism. An init script is inherently about both what is supposed to happen and how to do it. Since the "how" is hard and involves lots of details to get it right, it tends to overwhelm the "what". This leads to two problems:

  1. Init scripts are very difficult for an inexperienced person to understand. The little bit of policy is buried in a great mess of mechanism, and it's generally written as part of the procedure rather than separated out where it's easy to understand. For example, instead of saying "this process should be run as a daemon", it includes a procedure for running it that way. This is completely opaque to someone who understands the goal but doesn't understand the mechanism.
  2. Getting the procedures right is really hard, but they have to be repeated in every script that does the same thing. The net result is that there are a lot of really bad init scripts out there. They are either copied and pasted, with all the drawbacks that entails, or they are rewritten from scratch, with the inevitable risk of reintroducing bugs.

systemd deals with both these problems by separating policy (unit files) from mechanism (systemd itself). Unit files are much easier to understand than init scripts, solving problem 1. And mechanisms only need to be written and debugged once in systemd for every program it's starting to benefit, solving problem 2.

Debian reconsiders init-system diversity

Posted Nov 20, 2019 0:38 UTC (Wed) by pizza (subscriber, #46) [Link]

> Getting the procedures right is really hard, but they have to be repeated in every script that does the same thing. The net result is that there are a lot of really bad init scripts out there. They are either copied and pasted, with all the drawbacks that entails, or they are rewritten from scratch, with the inevitable risk of reintroducing bugs.

Exhibits 1-$VeryBigNumber: improper handling of variables, arguments, or data that contains spaces, leading to all sorts of joy.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds