by brian_cunnie · 5y ago · 0 comments
I like Linux, but I have mixed feelings about systemd, especially when I discovered that systemd runs its own DNS server, which prevents the DNS server I wrote from binding to port 53 using INADDR_ANY. Instead, I had to write code to enumerate the interfaces & corresponding IP addresses & bind to each one separately. Systemd's decision to run their own DNS server is a bit of overreach, IMHO.
It's like, yeah, that's a funny thing to also live in systemd.git, but systemd-resolved is functionally a separate product from systemd.
So when asked if I like systemd, it's a loaded question. It's great but absolutely sucks, both.
[note] It describes itself as "a suite of basic building blocks for a Linux system" - although in my opinion that implies more modularity than it posesses.
Principles aside, in reality, systemd has been a complete non-issue for me and a massive quality of life improvement for Linux as a desktop operating system.
Is it not possible to turn off things like systemd’s DNS server, etc? I imagine if you care about such things you should be able to reconfigure your OS to use something else instead.
However, you ask a good question. Lots of people do like it, supposedly. But I think there's a large clue to its controversial nature in that people still call it an "init system", and pointing out that it isn't is interpreted by some as an attack.
Basically, it started out as an init system, which was used by Red Hat / Fedora, which was positioned well at a time when certain distros, notably Debian, used crufty SysV init scripts which they wanted to move on from. When Debian adopted systemd, after some debate, every Debian-based distro did too. This wasn't considered a particularly invasive change at the time. But systemd started to expand into its "middleware" position, absorbing vital system functions like udev. Distros which adopted systemd found themselves along for the ride, while distros that didn't increasingly found that software was starting to break, forcing them to maintain forks, or chisel out the piece of systemd that made it work and run it standalone. So was created a network effect that forced even more distros down the path of least resistance into systemd.
Meanwhile, amidst all the grumbling that this bait-and-switch was provoking, the systemd project leaders had an astonishingly bad attitude towards the maintainers of software that they were breaking, which fomented considerable personal animosity on top of the technical resentment. Not only were they driving a horse and cart through the standard ways of doing things, breaking a lot of stuff in the process, they were being rude about it.
So, more or less, people resent systemd because it's difficult to find - or build - a distro without it.
Red Hat produced systemd. Red Hat is the major contributor to Gnome. Gnome now refuses to run without systemd. Every major distro wants to carry Gnome, so...
Well, at least some distros offer a choice. Some other distros (Alpine, popular for containers, Void, which powers my laptop) live happily without it. Various shims exist, logind exists to allow running things like Xfce without systemd.
You can see the same effect in e.g. politics.
It's one of those situations where the minority that doesn't like systemd is just a lot more noisy than the vast majority that likes it.
Easy as that.
The majority of people don’t give a hoot about it.
The short answer is...Red Hat has money and threw it behind systemd. Like them or hate them, they are in many ways the deciding fate of Linux systems. So, other distros fall in line. Ubuntu is a contender, but gave in and followed suit too.
Void and Solus are both good distros that don't use systemd. I'd go as far as to call Solus the best out of the box distro ive ever used.
IIRC the required parts of systemd are pretty much init-related, service-related (as in starting/stopping services based on certain conditions), udev and journald (which can and is often defaulted to forward to syslog).
Comments like yours make it seem like resolved, homed, nspawn, machinectl, networkd, cgtop, and all of the other utilites and optional daemons are required. They seem more like konquerour in your KDE analogy as in that they are nice if you want to buy into the whole ecosystem but by no means required to use the core program (and many seem to use alternatives instead).
I'm by no means an expert on this, so please correct me if I'm wrong.
I wrote a personal blog post about this (https://www.turek.dev/posts/disable-systemd-resolved-cleanly...) to try to help people out.
I suppose you could do that. although I prefer: systemctl disable systemd-resolved systemctl mask systemd-resolved
Then it's dead and will stay that way.
Does systemd want to be an init system? A logging system? a dnsmasq replacement?
Folks at Red Hat noticed that the Linux userland architecture is not convenient for what they would like to build. So they are building systems which replace the traditional mechanisms: first DBus, then systemd, which is an umbrella of many services: init + service monitoring + containers, logging, interactive login, some networking, etc. I suppose that in 10 years a linux kernel + systemd could be a complete system, with little need for other userland.
'Doing many things, none of them well' is actually the opposite of UNIX.
Nobody says things like "what is GNU? Is it a kernel, a compiler, a libc, a build system, a set of userspace tools?".
Likewise, the systemd project has many utilities under its umbrella, and most of them are completely optional.
What does all systemd software have in common? What's the unifying principle there?
[0] https://www.freedesktop.org/software/systemd/man/systemd-res...
It wasn't quite the solution I was looking for. I wanted my DNS server to "just work" for people who downloaded it—I didn't want to force them to re-configure systemd to accommodate my software.
Tweaking my software to accommodate systemd.resolved took ~4 hours. It was an enjoyable dive, but I'd rather not have had to do it on the first place.
I continue to think it's a bit of an overreach for Fedora to include a DNS server by default.
systemd-resolved is a separate project from systemd whose only relation is that it’s in the same repo. It’s up to your distro builder to decide if they want to use it. And also up to your distro if they want to use the stub resolver. It’s not necessary for systemd-resolved to work. The reason they have the stub listener is because on Linux every application is supposed to use glibc nss to resolve names but there are real-world applications that try, incorrectly, to parse resolv.conf and do dns queries themselves. This breaks things if your assumption is that all dns queries are going through systemd-resolved. And this project isn’t the first. Ubuntu and others have used dnsmasq as the stub resolver for the same reason. Using just the dns nss module and resolv.conf is fundamentally broken and at this point unfixable when you are connected to multiple networks or with separate dns or split tunnel VPNing. You have to provide your own, smarter, nss module and/or use a stub resolver to cover these use-cases.
The nice thing about systemd-resolved is that it make enabling split-tunnel vpns a breeze.
Do Linux users really want their year on the desktop, or will they keep complaining at any change to get there?
Worth a shot! https://distrowatch.com/table.php?distribution=artix