160 points · by mepian · 7y ago · 185 comments
Then I took a course on systemd specifically and it opened my eyes, and now I'm quite fond about it.
Systemd actually does ONE thing and does it well: it manages the system. It's the missing layer between kernel space and user space. It has quirks and bugs like all software, but I think it works very well, all things considered.
To those who say that it's complex and does a lot of things: it's complex because it does a complex work.
Now that same team is messing with system critical stuff. We know from the kernel command line debug debacle they rather see the world burn down than admit they did something wrong. They are again creating a super-complicated incomprehensible half- documented mess, that puts it tentacles everywhere. But the stakes are a lot higher.
I am not saying they are incompetent. At a low level, the code works. But at a high level, something is very wrong. Bugs can be fixed, but arrogant architecture astronauts not listening to their users, messing with core infrastructure, that's where systemd keeps failing.
systemd has been out for so long that I'm pretty sure we can judge it by its own merits now. As someone who maintains a few thousand servers but only uses desktop Linux on one non-primary machine, I have a lot more well-informed opinions on the trustworthiness and stability of systemd than of PulseAudio.
(And besides, my recent experience of PulseAudio has been that it's fine, and IIRC in the late '00s the primary problem with PulseAudio was that Ubuntu ran it in a non-recommended mode. I haven't actually had any problems with it recently, it just works.)
It seems like the discussion would be more informative and less flamey if we talked about systemd itself. If the team is untrustworthy, there should be numerous examples of that about systemd itself by now.
IME talking with our sysadmins face-to-face, I think a lot of the initial hostility was caused by emotional reactions like: This is different, I don't like it! (Don't get me wrong, it's a behavioral pattern that makes sense up to a point.). I think everybody I've spoken to actually ends up appreciating a lot of things about systemd. (But in these situations, I happened to be their employer, so that definitely biases the conversation even if these conversations weren't really about anything related to their job situation, specifically.)
I also get the impression that a big part of this is due to a lack of 'patterns' or easy recipes to get as much info as possible from the journal. Everybody can intuit the workings and benefits of a text file, but text files have drawbacks that are very subtle and hard to intuit at a visceral level. I think this is partially a lack of good defaults for journalctl. I think it would be better if it (by default) showed much more information and allowed users to turn off unwanted info.
Pulseaudio is definitely better at what it does than ALSA, it is not a step backwards.
My main gripe with anything from that group of people is that they refuse to play nice with others, and by extension that their code refuses to work properly with code produced by others.
Pulseaudio is in the same park as SystemD today. It works as long as you don't demand too much of it and don't stray from whatever they deem to be The True Path. It is better for your simple needs. Believe me, those who have advanced professional needs don't think highly of it.
The support for this systems come from people that just use it as packaged and don't have specific needs. Which would be fine IF they weren't getting in the way when you really have specifics needs.
Even if some of the concepts are sound, execution is terrible. As the saying goes, the road to Hell is paved with good intentions.
Can you expand? I've not heard of this.
Systemd developers were like "nobody can tell us how much detail to print", until the kernel developers made clear that the boot console belongs to them and if systemd doesn't back down immediately they would take away all console access. Systemd then backed down.
Maybe that fits RedHat's business model.
I would challange anybody, to introduce a totally new system layer on linux with less issues.
And Pulse Audio was started by Pottering but he quickly moved on and since then it literally has nothing to do with the people who work on systemd. Blaiming him for the persistence of issues with Pulse is simply unfair and would be done if he was not called Lennart Poettering.
I am not a fan of Poettering's code or his attitude, but people have treated him exceptionally badly. He's just doing his job. If these projects were allowed to compete for mind share fairly there would be no problem. If Red Hat had made sure that Gnome could work with alternatives then there would be no problem. Pulse audio would have died a rightful death. Systemd? I suspect that it would still have succeeded.
That's exactly the problem, though. You don't want all that stuff in your privileged PID 1 process. Nor blowing up your prod servers and getting in your way to even examine log files afterwards.
Which is pretty much what I blame him for.
He has a history of starting ambitious (maybe overly so) projects, doing all the fun stuff until it kinda sorta works, and then riding off into the sunset.
Hence it's pointless because it doesn't make things any simpler. All it does is making things monolithic and wrapping concepts that are perfectly fine by themselves, forcing third-party software to write to systemd's APIs.
> Systemd actually does ONE thing and does it well: it manages the system.
"Managing systems" is not what is meant by "doing one thing, and doing it well". Systemd takes over init scripting, logging, host names, IP, time, locale, and login, plus tens of more services. Making development of this software a Lennart Poettering/RH-only business rather than community-driven.
The trend to get rid of systemd and its metastasis into most of Linux is excellent news. Note that Slackware and Devuan are also systemd-free (and have been from the beginning).
I don't really feel strongly either way. I'll be pretty sad if Debian and redhat diverge.
sudo apachectl start
(and likewise for all SysV-like startup scripts). For node, it's node <yourapp.js>
(or rather using node-forever or node-cluster in prod). If you want to have it started on boot automatically, you put that line into your startup script. It doesn't get any more simple and transparent than that.Why would you be sad if Debian and RH diverge? Linux started as a one-man show and became a huge community effort because it could run a wealth of F/OSS software. If you want a single-vendor OS, there's Windows, Mac OS, the BSDs, and others. Or maybe IBM RHEL in the future.
Most of the things you mention are side-components of systemd, not core stuff.
You could change the hostname the old way by just go ediding /etc/hostname or using the hostname command (or both). hostnamectl merely exposes you a handy command to do this in a consistent way across distributions.
One could probably take systemd, dropp all the non-init components and make it a minimal init system.
I don't know where you're seeing this trend, really. For all major distros, it's been the opposite thus far.
That is exactly my opinion too. Systemd managed to replace the nasty cruft pile that was SysV init with something even less transparent, more confusing, clunkier to use, and with a steeper learning curve to do simple things like add or change a system service.
There is too much to list, but let's start with the beginning: why name one of the most commonly used commands (for admins) on the system 'systemctl', which is even harder to type fast than 'service'?
That kind of total disregard for UX pervades the whole design. Its like no thought was paid to it at all. Everything is obtuse and clunky with long non-memorable names that give you carpal tunnel syndrome to type.
I loathe stuff like that.
"managing the system" is not "ONE [problem]". A big part of the problem with systemd is this presupposition that management of something as large and complex as a modern OS is a single monolithic[1] problem.
> it's complex because it does a complex work.
See, you agree that it's a complex problem! It's so complex with so many different use cases it isn't even possible to have one solution, because some of those use cases are mutually exclusive. Hench why a modular design is important, so it isn't too difficult to replace the management of different areas if needed.
> It's the missing layer between kernel space and user space.
That "missing layer" isn't well defined. There certainly wasn't any "missing layer" on my old server, or the compute boxen we used at ${research_lab}.
If you're talking about desktop system, I agree that there was a gap between traditional system management and the GUI, but that isn't really a new "layer" between kernal and user space (it might involve GUI userspace programs with perhaps some of them being SETUID or a privileged daemon).
[1] Any objections trying to claim systemd isn't a tightly coupled, monolithic design will be ignored. If you think the number of binary program files is in any way useful as an objection, see: https://news.ycombinator.com/item?id=19024256
How about picking up the work as well?
And none of the alternatives seem to really get away from the bash script paradigm & more towards the declarative side of things, which doesn't feel like much beyond keeping all that was terrible about sysvinit around in thin wrappers.
Maybe GuixSD is the one exception to this.
Why would I want to start working on software I don't use or need? Why do systemd advocates always insist that every implementation must include the features they think are important? The entire point of designing for modularity is that different people have different requirements; operating systems cannot be "one size fits all".
> yet when logind came around, had lots of strong things to say.
Yes, we had strong things to say about software requiring logind, because it is a terrible (and poorly documented, at least at the time) design. If you want to use logind, go right ahead, that's your choice. We were (and are) only angry about software that we used to be able to use adding dependencies to logind (or other systemd components).
> And none of the alternatives seem to really get away from the bash script paradigm
That probably won't happen, because shell scripting is the easiest/simplest solution for certain types of problems. Some of us have tried a lot of variatio9ns, and keep returning to openrc/bash because it's easier and has fewer problems, at least in some situations. However, on a traditional system (or openrc) nothing is stopping you from replacing the bash init scripts with another language or replacing the entire init subsystem with something else (like upstart, s6, something new?). The complaint isn't that your should use my favorite tools (like bash) instead of systemd; it's that we should strive for modular software so we can all use the components that work best for our different needs,
https://unix.stackexchange.com/questions/5877/what-are-the-p...
As I said in other comments, if you want to replace inis scripts with systemd format service descriptors I will support your efforts becuase using shell script is broken. If you in the making of replacing init with something better also replace logging, ntp, dns, dhcp and a bunch of more then I will say no. This is exactly what systemd does. Rewriting rock solid, CPU efficient code with something shaky and CPU intensive. No thanks.
>>> And none of the alternatives seem to really get away from the bash script paradigm.
Factually incorrect. There are many init alternatives that got away from the shell script paradigm. Including SMF in Solaris. https://www.thegeekdiary.com/a-beginners-guide-to-service-ma...
Could you elaborate? What of systemd’s use cases conflict with one another?
It's a video from BSDCan, the Canadian BSD conference. Even some BSD people are realizing that systemd has a good point to exist!
But keep your lame conspiracy theory, it will surly get you much open-source street cred.
The problem is that it comes bundled with a whole bunch of other tools for handling networks, cron, ntp, etc which really ought to be separate projects. By bundling them with the successful init system they're not exposed to the usual Darwinian selection processes that shake out the best free software.
Still, systemd timers are exposed to the usual selection pressures: systemd the init does not rely on systemd timers. They’re a convenient addon that integrates well. But anything more convenient could replace them with no problem (as evidenced by cron still working on systemd enabled systems)
That they're part of the same project is actually a win for me, it helps to make the various components work well together. Also there is a common thread or philosophy in how things are built, making learning easier.
In fact "the system is a single project" approach reminds me of the BSDs, which is arguably better than Linux as far as usability and security is concerned.
I've had this thought as well. The BSDs aren't afraid to go off and do their own thing, and it works for them. I feel like generally the Linux ecosystem is held back by reluctance to break free from ancient conventions and standards like POSIX and such, so I come into this systemd debate skeptical of arguments that it's not "the UNIX way" or that it's too Linux-specific or that it's stepping on other projects' toes, or that it's not the way things have been done before.
The systemd critics have legitimate criticisms which can be addressed through evolutionary improvements, but I don't buy the philosophical arguments that systemd is fundamentally flawed.
No, they can't. The fact that they're compiled into separate binaries doesn't mean they're independent - they're completely dependent.
I mean,there's something called user-acceptance testing for software dev lifecycles right? (Not a pro dev myself) systemd obviously has an issue being accepted by a lot of users even after almost a decade now(?)
Even before systemd there were other init systems used by different distros. The fact that systemd demands other things to adopt to it instead od smoothly integrating with existing systmes is one pain. A bigger pain is how it is expected to work well for everyone. I mean, dislike for "one size fits all" solutions is a major reason why most Linux users became Linux users.
As an end user I don't mind SystemD for writing / managing service unit files. I often find the restart policies and one time only jobs useful especially in cloud with automated deployments. My feelings on SystemD as end user are neutral, it does have some useful things but I understand some of peoples grievances with it.
On the other side I have some OpenBSD systems and the simplicity of OpenBSD service management just being plain bash files is really pleasing to use if anything because of the simplicity and power/functionality it provides without actually doing much itself.
Nit: OpenBSD uses ksh not bash
Yeah, except that the "one thing" it does is "everything".
It manages the system in a way that not everybody needs or even likes. To the people who hate it, it solves problems that other people have but brings new problems that they now have. It's not so much about if it's good or bad but more about whom it was made for.
No, really. I, the system administrator, manage the system(s). Does Systemd make my life easy ? No, again. It's something I have to deal for. If I could, I would follow the example of Knoppix.
Knoppix is a live system, so all of the things systemd was designed for don't apply. I guess it can make sense for their knoppix's use case.
Knoppix claim to fame is automatic configuration. If your Xorg or sound was giving you grief after a fresh install, you'd live boot Knoppix and copy the configuration files back to your installation.
From this p.o.v. it makes sense for Knoppix' use case, because, as stated by Klaus Knopper: "This bypasses systemd's interference with many system components and reduces the complexity of the overall system."
Is it really so? I would expect all distributions to have stolen that feature by now. Xorg works out of the box basically everywhere. I've had a glitch with a microphone on a 3-pin jack on a Ubuntu system, and I doubt Knoppix would have known that a modprobe config change was needed.
[0] https://distrowatch.com/index-mobile.php?distribution=knoppi...
From this German article[0]:
> Knoppix' Startvorgang läuft nach wie vor per Sys-V-Init mit wenigen Bash-Skripten, welche die Systemdienste effizient sequenziell oder parallel starten.
> Knoppix' boot sequence still uses Sys-V-Ini, with some bash scripts which start the system services efficiently sequential or in parallel.
So it has still all the downsides of sysvinit, except that might start sevices in a more efficient order or some in parallel.
[0]: https://www.golem.de/news/live-linux-knoppix-8-0-bringt-mode...
Okay, but doesn't that remove a lot of functionality that is available with systemd units? In this whole systemd debate, I've never seen a really clear outline of how much complexity systemd covers, and whether the older alternatives were actually simpler or not. Granted, I haven't looked very hard. I use systemd with Arch and have no known issues with it.
It means that Linux community is full of people that refuse to give up on their gripes even after years. Those also tend to be the people who refuse to understand that "the old way" might not be the best way to do something and also fail to produce a viable alternative.
Linux audio was not usable for end users until PulseAudio stabilised. Init based on scripts was a trash fire. And yet, although SystemD and PulseAudio aren't perfect, noone managed to produce anything comparable except pages and pages and pages of whining.
These people need to let it go. This toxicity is unhealthy and it's just damn software.
Two of the three components in your list that are mearly mandatory came from the same engineer. Why we do we keep accepting his code?
FWIW, the desktop world is less important and I run Linux as a desktop. The nightmares I get from systemd are all about my servers. If we could have left servers alone, people like me wouldn't even have cared. As it is, I have to get out the kid gloves when I'm dealing with my service platform because Bad Decisions are now system standard.
Sure, you can use XWayland and just call it a day, but that doesn't really help.
The reality is that exactly due to the enormous legacy baggage of the "X ecosystem" it's not easy to just switch "to Wayland". GTK, Qt, and (again, due to the required hacks) all major apps (eg. Firefox) have to do serious work (as in finally implement something sane, now that it's an option) to work.
DBus is okay. Though bus1 might be an improvement, and having it in kernel would be a bit more efficient (zero copy, better security, etc).
Fedora has been defaulting to Wayland on fresh installs for at least two or three releases and generally it’s working okish. There’s still a lot of software lacking proper wayland support, though.
In the early 2000's, distros didn't have live environments bundled. All debian used to have was a TUI installer and that's it. Ubuntu 4.10+ introduced a live sessions.
From 2004-now driver support and hardware detection has gotten much better. There are live session CD's that include "nonfree" drivers that further improve hardware support. You can pop in most popular distros and easily connect to WiFi and mount drives, often just as easily as knoppix did.
This complaint about systemd isn't a user-related, but the perspective of the live cd creator. Maybe it's true systemd doesn't help that case, but would systemd get in the way of a live cd user though? They're likely not going to be adding/removing/starting/stopping services, setting up users/groups, or anything else that'd be done in a permanent environment.
The one benefit would probably providing a glibc version if you require it.
(I'm a Void Linux contributor.)
I wrote about void because it “felt” like the philosophy of BSDs in the Linux land. Which is quite a draw for me. Binary packages, up-to-date kernel, and a sane init system felt fresh and in KiSS realm.
And by the way - if you're doing something Debian-based - make it Devuan-based, it's pretty straightforward. http://www.devuan.org/
It's also pretty straightforward to switch Debian systems back to sysvinit.
You still need libsystemd0 which is a compatibility library. It's actually unfortunately named, as it isn't part of systemd itself.
I've been using sysvinit on my Debian workstations since systemd became the default. It takes me about 5 minutes to switch a new system over (admittedly I don't use Gnome or KDE). The stackexchange thread you linked is out of date and switching is getting easier. I recommend following the debian-init-diversity mailing list for further info.
But i was seeing that in Embedding Linux or IoT distributions that doesn't make sense since they're run on limited resources.
Systemd is not that heavy to run when configured correctly (which is what the distro should do).
Device have 256MB.
(That's not to say systemd has no bugs. I expect it does. We either just didn't run into them, or we tested whatever complex thing we wanted to do—far more than could be expressed in any other init system, process keeper, or systemd competitor—found it didn't work, and moved on. That would be indistinguishable from systemd intentionally not having some fancy feature, and it definitely didn't affect us in production.)
Meanwhile, I can remember numerous concrete bugs in the Linux kernel, concrete misfeatures, and downsides from having a monolithic kernel where if one thing goes south everything does. But nobody warns me to avoid Linux....
When I want to write a script that runs on startup, I expect that I can just put (or link) it in some directory where the scripts are that get started on startup. Or that there is one main script that calls all scripts that are intended to be startet on startup.
I do not want to write a "service" that has some "only run once and then discard" flag or whatever.
When I want to look at logs, I want to use the tools I like. less, grep, tail etc. I do not want to dabble with some binary format and its tooling.
When I want to start or stop a service, I want to call a script that does that. A script which I can look at and see what it does. Like /etc/init.d/apache2. I do not want to execute some magic command like "service apache start" which I have to guess or look up and which gives me no clue about what it does.
This is fine, but you do have to accept that things are going to move on without you.
I explained, why systemd is a step in the wrong direction in mutiple ways. That has nothing to do with habbits.
I see a bunch of "I want X", but I don't see any "why"
This is not very specific, have you never had any race-condition with this? There is a reason SystemD ask some informations regarding the service that needs to be launched. I don't see how ignoring those makes a good argument against SystemD.
AFAIK, systemd is compatible with sysv init scripts.
> I do not want to write a "service" that has some "only run once and then discard" flag or whatever.
Why? Writing one isn't so complicated.
> When I want to look at logs, I want to use the tools I like. less, grep, tail etc. I do not want to dabble with some binary format and its tooling.
Well, nothing prevents you from piping output from journalctl to whichever tool you prefer. In fact, people do it all the time.
> When I want to start or stop a service, I want to call a script that does that. A script which I can look at and see what it does. Like /etc/init.d/apache2. I do not want to execute some magic command like "service apache start" which I have to guess or look up and which gives me no clue about what it does.
I don't see how sysv init is any better than systemd in this regard. You'd still have to look at indidual scripts to see what it does. It's not like systemd hides the contents of the service files.
Interesting. I feel the other way. Unix failed to provide a real service management system early on, so we have layers of historical cruft (Fork, close all descriptors, fork again, escape process group? Really?), and ended up with all kinds of absurdity in shell scripts to handle it.
The right way is to have a strong system contract on what constitutes a service, and have no wiggle room so that 'service apache start' does a fixed, known thing.
Sadly, systemd has to support all kinds of legacy hacks. A nice way to chart a way forward might be to define a simple contract and require someone to mark a unit file as "legacy" to enable the other possibilities.
Then just use cron.
SystemD needs to die because it violates Unix principles, not because of it's new key combinations. Unix is built on the notion that everything is a file, and that purpose built binaries make sense. SystemD breaks the latter - meaning it's now significantly more work to do the same things when it comes to log investigation, service analysis, and related events.
Perhaps the worst part is the extension of a subsystem for service initialization to everything other than that. The folks at suckless (https://suckless.org/sucks/systemd/) did the argument significantly more justice than I ever could.
It is my clear impression that many Windows users would be hard pressed to explain what 'Windows' is and does.