I actually like using systemd. I took the time to learn how to use it, and as a desktop Linux user, it's honestly quite nice.
But the one thing that still really pisses me off about systemd-the-project was the fact that they ate udev-the-project. In my view, that decision was unnecessary and was done for purely anti-competitive reasons.
If you're not familiar, udev is basically the user-facing device manager for Linux. It's what allows you to easily configure rules and permissions for all the USB devices that you plug into your computer. These devices still need kernel drivers, but udev is how you tell your system "Please let user ohazi use this device, and also give it a convenient name like /dev/someDevice0"
By devouring the udev project, the systemd maintainers have guaranteed that dealing with USB devices on non-systemd systems was going to be a giant pain.
Then came the forks -- Gentoo maintains eudev, which is a systemd-free fork of udev. But really, this shouldn't be a fork. Udev should be independent and available on all systems. If systemd wants to do something special with devices, they should use udev APIs like everybody else. In my view, this is what finally allowed systemd to win the init war, despite all the protest. Ideological arguments about how best to start daemons is one thing, but you simply can't use a modern system without a sane approach to USB.
Edit: It seems that some of my concerns were overblown, e.g. you apparently can run udev without systemd as pid 1. Udev has a build-time dependency on systemd, but not a run-time dependency. The eudev fork removes that build-time dependency, and (maybe?) also papers over some other inconsistencies. I'm pleased that this is the case. I'm annoyed that the discourse around systemd/udev has been muddy enough to lead me to incorrect conclusions (and I'm aware that the original version of this comment likely added fuel to this particular fire). Oh well... live and learn.
The person who started udev (i.e. me), and the person who did the majority of the work on udev to make it into the proper solution for everyone (i.e. Kay Sievers), both agreed that it made more sense to move it into the systemd codebase in order for lots of duplicated code and functionality to be removed.
By doing this, we have made the maintenance and support for this core userspace tool much easier for everyone who was involved in working on it.
If the developers involved in a project do not do what you want with that project, feel free to fork the project as that's the beauty of open source! And hey, that's exactly what the eudev developers did, go use their fork if you want to, no one is forcing you to use the version from systemd, just like no one is forcing you to use any other open source program. It's your choice to do so or not :)
Why did you chose udev using libsystemd and not systemd using libudev (or made a different shared library, I'm not familiar with what happened)? Seems like this would have been a more widely accepted change and achieved the same thing.
As I understand there was some shared code between the two projects and udev was refactored into using systemd's code. Why not make systemd re-use udev code instead? Aka either expand udev's library or make a library out of the shared code that's used by both systemd and udev.
That way udev stays a separate project and you don't have to bring in a big library to use it. Systemd needs udev both ways so it changes nothing for it apart perhaps a bit of maintenance for a separate library for the shared code.
Expanding udev's library would probably end up a decent size library of other functionality, I don't think there is any good way around needing this. This is not code that could be deleted from systemd if it was separated. The way eudev has handled it is by doing what you describe and copying those shared functions out from systemd: https://github.com/gentoo/eudev/tree/34b2037d379e33f1cf79a34...
The result of that being there are two copies of the same shared code floating around, which is what they were trying to avoid.
>but if you check the code for udevd at this moment you can see a lot of use of utility headers that are not really appropriate for a libudev:
That's fair.
>This is not code that could be deleted from systemd if it was separated.
Why not? You could make a library out of those utility functions and use it from both systemd and udev (without having to include most of libsystemd which doesn't seem useful for udev).
I don't have a quote handy, but systemd maintainers have previously said they are not interested in also maintaining a giant public API of utility functions, on top of everything else.
(That bug was causing udev to give multiple disks the same name in /dev/disk/by-path, which I think is pretty much core udev functionality, given that udev was intended to supersede devfs.)
I'm just curious, how would you suggest they debug and maintain support for that hardware, without even owning that particular device? It seems like anything they do would just be a wild guess as to whether it actually works or not. In my experience with this specialized datacenter hardware, if people want any of this stuff fixed (in userspace or in the kernel) it usually falls on the hardware vendor to hire some developers to fix it and upstream it, or at the very least donate some hardware to the upstream project so they can test properly.
If they felt they needed information from, say, the Linux scsi maintainers then they could have gone out and asked for it. If they thought that in order for udev to do a proper job with these devices they needed the sg3-utils maintainers to write something new, they could have gone and asked for that. As it was they just stuck a "needs-new-home" label on the bug and ignored it.
I think useful action would have been more likely if udev had still been maintained by a team who believed they'd taken on the responsibility to make /dev/disk/by-path work, rather than maintained as a small part of a project whose maintainers are mostly interested in other things.
(Also, IIRC from what I had to do to work around it, they could have fixed that bug by reverting the change that introduced it. It wasn't a case of existing udev code not working with new hardware; it was caused by someone making changes without understanding the consequences.)
That's what I mean though, all of that seems to be just wild guessing as to what will actually work and sending random emails out to random people who may or may not be able to fix it (Disclaimer: I don't know anything about this specific bug or the specific hardware). Wouldn't someone who actually owns the device and knows who to contact on the kernel side be a better person to lead the effort on that?
The right people to lead the effort on fixing bugs in udev are the udev maintainers.
If people did not wish to have the responsibility for leading the effort to fix bugs in udev, they had the option of not taking over the maintenance of udev.
I agree with ohazi, above, that the world would be a better place if the systemd people had availed themselves of that option.
(To be fair, it looks like this issue was fixed a few months later by someone who knew what they were doing. So the main lesson here may be something more like "@poettering should not be triaging udev bugs".)
I see people saying this kind of thing often in open source and I think you are missing the point here: who is going to fix this bug? You can say systemd developers shouldn't triage it, and then you're left with nobody to triage the bug at all. So what will you do? The point is, they don't own the hardware, they can't fix the bug. You have to find somebody who actually does own the hardware who knows what is going on, which seems to be exactly what happened. But if you get unlucky and if zero of those people are contributing to udev or any of its forks, then the bug probably won't ever get fixed.
For what it's worth, I didn't mean that the systemd people shouldn't triage the bug.
I meant that I suspect @poettering was mistaken when he said the current maintainers didn't collectively have "the expertise and understanding to maintain this properly."
As far as I can make out, there was nothing particularly hardware-specific about the bug. The bug was that udev was assuming that there could be no more than one disk per SATA host node, which turns out not to be the case.
`udevadm info` output would have been enough to see what was going on, which I'm sure the reporter would have happily supplied.
From what you were saying earlier, from the perspective of the bug triager, it sounds like there were multiple areas that maybe this could have been fixed in, not necessarily udev. So still that comes back to: the correct people to triage that bug really would have been the distro maintainers, who have total visibility over the whole system and who are better equipped to pinpoint where the bug should be fixed. And then from there they can pass it off to a systemd person or an OEM person, or both, or whatever (Again disclaimer, I don't know anything about this particular SATA hardware or whether this is normal behavior for a host node, this is just my experience from trying to triage this type of bug).
And they will continue to be bitten by problems specific to large-scope projects. Wanting something, no matter how much, does not let them escape engineering reality.
Apparently not. If they had not signed up for it, in this case they would not have ended up triaging a bug they did not have the skills or hardware to tackle.
Just to be clear: the alternative there is that nobody looks at the bug at all because nobody but the bug reporter has the hardware. I don't think that's what you want, I assume you would just prefer the bug to be fixed.
No, the alternative is that, with no clear owner of the bug, the ownership problem gets dealt with early, rather than having the bug go stale in a can't-fix-won't-fix state for months because the wrong people claimed ownership of the subsystem.
>the wrong people claimed ownership of the subsystem
That's... not what's happening at all? The issue is there _wasn't_ any of the right people around to claim ownership of the bug. It's not like someone in the know can't just look at the systemd bug tracker, it's all public. Like, I get what your complaint is, but at the end of the day, do you really care who's name is on the commit that fixes the bug? I usually don't, and most maintainers I know probably don't either -- they're usually happy to delegate to someone who's more knowledgeable in the problem area. If you have some other solution you'd like to suggest here then I'd love to hear it, let's move beyond the criticism and start thinking about solutions. And I don't even mean this as a solution in systemd, I mean this as a "helps anything that interacts with hardware and has bugs that could potentially be caused by hardware" solution.
This wasn't a hardware bug and it didn't materialize only when some particular hardware was plugged in. Were they just supposed to open a phone book, pick a random hard drive manufacturer, and say "hey this is your problem now"?
You use a tool like cat, vim , emacs, or tail to see logs. You can't physically read the file off the disk, how is this different than using journalctl ?
I think the issue is not that it's binary, but that it's a custom half-assed format. It's actually pretty slow because there is not enough indexing, this is why `systemctl status` can takes seconds to show the last 10 log lines[1]. Even worse, systemd can detect corruption but can't repair the logs[2], in practice a power failure can mean months of logs thrown away. Thankfully it can skip over corruption, so logging continues to work.
I would have no problem if systemd used a database like sqlite, lmdb or anything else with some valid tooling, indexing, caching and proper recovery solutions.
I looked into this a while ago -- a traditional transactional CRUD database is totally unnecessary here, these are not files that you want to be editable by random tools. The journald log files have the important property that they are append-only by a single-writer. I agree there are some outstanding issues but those issues should just be fixed, instead of throwing it all out and moving to an even more complicated database layer that brings with it all its own additional problems. I think it would be perfectly feasible for someone to improve the indexing to show the latest 10 lines, or to write a fsck-type tool to repair damaged logs.
> instead of throwing it all out and moving to an even more complicated database layer that brings with it all its own additional problems.
Would SQLite be any more complicated than what they have now? Or OpenLDAP's Lightning Memory-Mapped Database (LMDB)? OpenLDAP/Symas' Howard Chu on the latter:
Conventional logs are files, the fundamental unifying abstraction of Unix, and so you can read them with any tool, even a tool that was written before your logging system and that your logging system's author didn't know about. Having to take them just as piped input is a much more limited interface that doesn't allow you to do all the things you can do with a real file.
You can't do random access through a pipe, so you can't binary search for it, or if you have some kind of probabilistic skip-sampling tool that won't work. Pipes don't have names, so anything that expects to work with them won't work. You can't re-read the same file. I don't know all the things you might want to do, but that's kind of my point - most things work with and expect files, and so if you want to be able to count on being able to use other unknown tools, a file is what you need.
So, back to the original question: what's the problem here? what is disallowed?
Also: If all pipes are files, but not all files are pipes, it would seems to me that files are more restrictive. That, and the extra steps you need to take to avoid needless IO.
that doesn't allow you to do all the things you can do with a real file
I'm not interested in what the differences between a pipe and a file are (I know) - I'm interested in why OP thinks they are relevant in this specific context/case; particularly in context of my statement:
seems to me that files are more restrictive
Is, for example, a sticky bit relevant to systemd log files?
There are plenty of unix tools for filtering files based on all manner of things. That's the unix way of doing things, and for many users the ability to mix and match unrelated tools is where a lot of the value of linux-like systems comes from.
I don’t find grepping text logs for a service file name with many false positives better in any way than just filtering on an actual column of a quasi-db.
Also, you can pipe the output of journalctl to do whatever you want with it with those unix tools.
Which I recall being touted as one of the major advantages of systemd - specifically that binary log files would make for much easier log aggregation as it would be more efficient to send over the wire. Fast forward to today and the best way of shipping logs is to force journald to output to, uh, text, then wring it through, yes thats right, syslog, to then be sent to a central server...
At the risk of uttering a "you're holding it wrong" defense, it feels to me the issue isn't with logging format, but the stubbornness of *nix admins used to working with text. For better or worse, software moves in the direction of things large amounts of developers like the most, whether it makes sense or not.
What do you imagine that ratio shows? Different projects use issues differently, so that number isn't super comparable...
And I've also noticed that low-level systems projects generally attract relatively few stars (i.e. a javascript library or go library will have more stars than a well used c library or systemd). My theory on that is that the people involved in projects like systemd, gnu, etc, see github as mostly just a git repository host, and don't bother with stars etc.
I guess from my perspective, I put zero weight into the stars on a project, and issue count only matters in the context of how the project deals with issues. What do you see as "worrying" in there? Do you see more value in those numbers than me?
Github stars are just bookmarks. They're not an expression that someone loves the project, or are using it, or even very interested in it - they're just a way to bookmark something that piqued your interest, so that you can find it later.
This tells you why "low-level systems projects" attract less stars. It's because well-known, long-lasting projects attract less stars. There's a little point of starring a repo of a project that you recognize and use. You remember its name already. Meanwhile, a random JS library that looks like it could come in handy in the future? These things come and go, and you'll forget its name 5 minutes from now anyway, so you star it.
I think it generally shows how active, responsive and sufficiently staffed the maintainers are. should projects be on github if the issues aren't used as intended? the worry comes from the number of systems in production relying on systemd
> should projects be on github if the issues aren't used as intended?
What do you mean by "not used as intended"? systemd has a mailing list too, but they also respond to github issues. Does having multiple different forms of interaction with your community mean you're not using issues as intended?
Some projects use github issues as a sorta backlog, or in conjunction with milestones and github projects to track future work. Some don't. Are projects that don't do that not using issues as intended?
As far as I know, github gives no general guidance on how to use github issues, and it's up to each project to setup issue templates and/or contributing.md files to explain that project's expectations.
> generally shows how active, responsive and sufficiently staffed the maintainers are
Okay, so if a project has a bunch of maintainers and is so well staffed they close all issues immediately, that means they have 0 issues, so that's good, right?
Except many well-maintained projects on github have hundreds to thousands of open issues, like nodejs with >1k, rust-lang with 7k, etc.
From where I sit, how well-maintained a project is has almost nothing to do with how many issues it has. Issues are a function of number of users (which is much different from level of maintenance), and maintainer policy on whether they close issues without enough information, close stale issues automatically, use issues to track backlog work, etc.
There is for example nixpkgs, which uses issues very differently to a conventional repo, and you can’t really argue whether the project is over/under stuffed based on that, since it packages almost everything. Some of the issues may be upstream bugs, etc.
The criteria for a person to star a repo likely varies person to person. Therefore I’m not sure it’s a useful metric of anything in particular? Some crude popularity metric maybe? I don’t star repos myself. Feels more like a social networking feature.
For what it's worth, I also don't think comparing issues between different projects works.
If you have project A, run by a company, which uses an internal Jira instance to track backlogs and developer's selected tasks, but uses github issues to track all user's reported bugs, well, that will have fewer issues than project B, which uses github issues to track backlogs and sprints in addition to bugs.
There's a lot of variability in this. The kubernetes project (~2k issues) has a bot that closes issues after 90 days by default (~9k closed by the bot so far), and without that bot, they'd have way more.
> A large number of open issues means the maintainers can't keep up.
That's not necessarily true. Github doesn't prescribe that every issue is immediately actionable. Perhaps the issue was tagged as "feature-request / help-wanted". Perhaps it is marked as "awaiting additional reporter info" (like logs, or OS), and there's nothing the maintainers can do until the reporter gets them more info.
Whether every issue gets triaged tells you something about whether maintainers are keeping up, but issues that are triaged aren't then always closed, so the number of open issues doesn't tell you much about how many issues are triaged and how quickly.
I had a hard time trying Devuan because all the package mirrors are really far away from me unfortunately, but I don't have any issues at all just removing it from whenever I am working with debian servers. It all used to work through some shell script called systemd-shim, I'm not entirely sure now though, maybe someone else has an idea off hand
>that decision [...] was done for purely anti-competitive reasons.
This is not correct, I don't know where you got this idea. The systemd-udevd daemon still runs without systemd. The code has moved into the systemd repository, and it has a build dependency on libsystemd, but otherwise it has no runtime dependency; your distro should be able to package it separately if it wants.
Can you point to a distro that does this vs. using eudev? I mean, you might be right, but I haven't found any, and I think the reason for this is that there are subtler inter-dependencies that require additional workarounds:
> > Also, AFAIR the connection between systemd and udev doesn't really go deeper than the fact that they're sharing the same upstream tarball. It is still possible to build and use udev without systemd
> But that's not really the case operationally, and it's why eudev was forked away from it for Gentoo.
I believe the reason for eudev is to avoid some of those other unwanted changes from upstream udev that broke udev scripts. Which to me is a fine technical justification, but not really related to another udev implementation having a build dependency on libsystemd. The udevd package seems maintained so I really don't understand what operational issues that comment is getting at.
Interesting. I didn't realize this was a supported option, but the Gentoo wiki also seems to agree with you [1], so I may need to walk back some of my frustration around this.
I still have concerns that having a shared codebase makes it easier for interdependencies to materialize later, but if they've managed to keep it as decoupled as is claimed here, then I'm pleasantly surprised, and also annoyed that the communication around this issue has been confusing enough to lead me to an apparently incorrect conclusion.
Most of the systemd components actually work without systemd as the init. I've used udev and nspawn without systemd-init.
As long as you don't have a problem with libsystemd existing, most things work fine without systemd-init. Mainly systemd-journal and systemd-oomd both require systemd-init.
The people that makes distro without systemd have users that scan the filesystem and get crazy if they found the name systemd in the filesystem. I can say the same for the devs also. So we have hardcore-hate distros that "liberates" packages and the dependency of the unused library. Better give that time to make the distro better imho
In practice I think systemd-udevd probably still runs without systemd, but as I understand it that's not an officially supported solution and the systemd developers have said they reserve the right to make changes that break it at any time. (The main reason why they haven't yet is most likely that their attempts to integrate dbus into the kernel and systemd more tightly were rejected by the kernel devs; if I remember rightly that was expected to be the point at which you could not use it without systemd.)
Using the kernel interfaces that udev relies on without using udev itself is also unsupported and the developers consider it within their rights to break those as well.
It has been supported for at least the last 9 years now, I don't see why they would have any reason to break it.
>The main reason why they haven't yet is most likely that their attempts to integrate dbus into the kernel and systemd more tightly were rejected by the kernel devs; if I remember rightly that was expected to be the point at which you could not use it without systemd.
That seems quite dubious, udev has never depended on dbus, and there really would be no reason for it to ever do that.
>Using the kernel interfaces that udev relies on without using udev itself is also unsupported and the developers consider it within their rights to break those as well.
This I know is true, the netlink stuff varies really wildly from driver to driver. The alternative would be to put udevd and the other userspace bits into the kernel, which I really doubt anyone wants to do.
IT's not my area of expertise, but the eudev page does speak of restoring some functionality that it lacks without systemd running alongside it, as well as removing glibc and GCC specific dependencies.
There is probably a reason why even many binary systems adopted eudev instead. — the maintainers often justify this with “problems” with udev but never go into much detail about what that is but the language does keep suggesting that it restored some functionality that is missing if it run sanssystemd.
> but the language does keep suggesting that it restored some functionality that is missing if it run sans systemd.
People often misunderstand what libsystemd does. See the many reactions here, but also e.g. the response by Devuan around libsystemd.
Too often people assume things around systemd, or too heavily rely on incorrect information found via Google.
That things are being done this way by a few projects to me isn't enough. Nowadays people did not thoroughly investigate things before they take a decision. See e.g. the various responses in this thread.
Libsystemd is just a shared library with some common code used by various systemd daemons (an epoll-based event loop, the dbus protocol implementation, uuid generation, parsers for the binary logs, etc). I can understand why people don't want to run systemd as pid1, but having some other external daemon depend on this library doesn't make it any harder to bootstrap that type of distribution.
I cannot shake off the feeling that the core developers standing behind systemd, pulseaudio, Gnome desktop spend a lot of time using macOS, and like it better than Linux.
This would explain why they imitate or copy many of its features (and misfeatures), and seemingly tend to replace the Unix ways with entirely different approaches. Effectively forcing things on users, as it was with pulseaudio and systemd, is also a very macOS thing to do.
I'm not opposed to replacing Unix with different approaches, as long as they keep playing on its key strengths, and do not remove modularity and composability. That is, Plan 9 is fine with me. Much of what Red Hat does, sadly, no.
I've heard this a lot, but having used Gnome briefly and MacOS fairly extensively, I just don't see it. Also, have you seen KDE's Dolphin? If ever there was a Finder clone, it's Dolphin. With regards to copying MacOS, Dolphin devs have wiped the floor clean with Gnome.
Besides Dolphin specifically, KDE in general is flexible enough that making it look and feel like MacOS is pretty easy. Gnome though? It's not particularly MacOS-y by default, and Gnome devs have naked contempt for customization, so good luck if you want to try anyway.
However, I share your suspicion that most Gnome developers do not actually use Gnome as their daily driver.
Yes, that naked contempt to customization is what I find more macOS-y than any exact copy of the visuals. KDE in this regard is pretty safe: you can bend and shape it to taste pretty thoroughly.
Interestingly, classic MacOS, at the times of 6.5 or 7, was somehow more customizable, and seemed to have more power-user features. Just like, well, Gnome back in the day %)
Interesting that you found Dolphin to be a Finder clone. It may well be, I just didn't see it besides some superficial UI similarities.
I think Dolphin is one of the very best Linux apps out there while I found Finder to be very clunky, often so unintuitive and useless that I resorted to command line instead. To be honest, it would probably have been fine if I took the time to learn the Mac idiosyncrasies like missing cut/paste, but Finder was one of my main gripes when I had to use Mac for work.
To be frank I find both Finder and Dolphin to be generally unsatisfactory. Finder is worse though, it's riddled with bugs and weird shit. I could never get Finder to show preview thumbnails of symlinks pointed to files on network mounts (while the Dock's folder view could always thumbnail those same symlinks just fine.) Or, when you mount a network drive, Finder can take dozens of seconds to recognize the mount has succeeded, while in a terminal next to finder you can clearly see it succeeded instantly. In Finder, thumbnailing sometimes breaks and completely stops working, with no indication of why. `qlmanage -r` usually fixes it, but what is the point of using macos if I have to waste my time fixing janky shit in a terminal? It's worse than the modern linux desktop experience.
Dolphin just has weird omissions; for instance try to sort a directory of symlinks by the time those symlinks were created. As far as I can tell, you can't do this because Dolphin follows the links and sorts by the dates of targets (contrast with `ls -ltr` and Finder, which sort by the dates of the links.)
Gnome is one of the most customizable DEs around. You can customize almost every aspect of it via the extension mechanism. I'm even running a full tiling WM right now that is coded as a Gnome extension (PaperWM).
The customization in the desktop of GNOME itself is still there, but it has mostly moved to shell extensions. If you're willing to deal with that, you can change quite a bit of functionality.
The apps are a different story, those tend not to go for a lot of customization and will usually just focus on optimizing for one or two use cases. If you have other use cases, the suggestion there would probably be to make a separate app.
GNOME would be fine and was fine up until the attempt at tablet integration happened, and it's been total chaos since then.
The problem is they hopped aboard the same bandwagon Microsoft did with Windows 8, where every started throwing tablet/touch style UI onto desktop interfaces.
For the life of me, I don't understand why there wasn't a happy middle ground of "or we'll render the main menu as a regular menu bar".
But at this point it's not a GNOME criticism so much as an entire UI/UX industry criticism.
This is a common thing I hear but it's not true. The hamburger menus were done to save space and reduce clutter, not out of any desire to be a tablet app. I sympathize with your criticism but it wasn't done for that purpose, it's just a coincidence. Also I should note, there are many non-tablet laptops that happen to have touch screens. These are not exactly rare these days, and AFAIK that was also a hardware segment that Microsoft was targeting, not just tablets. They weren't just making touch interfaces to sell the odd Surface or two. Sadly I don't know of any more elegant solution to this than what they're already doing, apps that want to work well here always have to straddle an awkward line where they have to support both traditional mouse and keyboard operation, as well as touch screens, at the same time. It's not an easy thing to design apps for.
To actually make good native touch/tablet apps in GNOME, you need to use a separate library called libhandy (renamed libadwaita for GTK4), and the app needs to be designed in a different way. You can usually tell the difference with an app made specifically for touch screens because it will totally de-emphasize the keyboard and mouse. I see more and more of these type of apps but only in the last couple of years, and it's mostly not to target tablets but to target the new open source phones e.g. Librem, Pinephone, etc.
>The hamburger menus were done to save space and reduce clutter, not out of any desire to be a tablet app.
"Save space"? That's a laugh. Reducing clutter is ill defined and probably subjective, but saving space? Saving it for what? The default window decorations, widgets, etc are bloated, not slim and compact (as they would be, if they were saving space.) Everything has huge margins, big buttons, and empty voids. "Saving space" is not a principle Gnome cares about.
Do you know what huge margins and big buttons are actually good for? Touchscreen interfaces designed for fat fingering. That's what Gnome cares about.
Again, what you are saying is not correct. You may be comparing their designs to other apps developed for other desktops using other toolkits, but that's not what is influencing GNOME. The space is saved compared to previous designs that were used by GNOME. Please consider comparing an old style GTK app with a new style GTK app:
The old style has four bars at the top (titlebar, menubar, toolbar, secondary toolbar). The new style merges them all into one bar and moves the menus into the hamburger menu. The margins may be bigger in the new style but ultimately, space is saved and the UI chrome is reduced. Also, GNOME Builder is not an application designed totally around touch screens -- it's a text editor, for typing into.
I sympathize if you don't like this style of app (and I encourage you to use different apps if you were used to having a lot of menus and toolbars, and you don't like the new style of GNOME apps), but what you are saying about the design goals and motivations does not match what the developers are actually doing.
If plan 9 is what you want, I would encourage you to use 9front. I can't see why you would use Linux if you didn't like Red Hat, they have been a key contributor in Linux land for a long time, employing many long-time kernel developers.
I'm not sure if 9front can be a daily driver yet; say, it does not seem to be able to run Emacs. Would be nice though.
Not that I don't like Red Hat. They are the poster child of a successful open-source company, and did and keep doing a ton of great things. I only don't like certain directions of development of certain userspace things which happen to be done under their corporate umbrella. These things, systemd in particular, were quite noticeable on the Linux landscape as of recently, both in the tiny desktop niche, and the huge server sector. Nobody's perfect, you know.
I have to say, that seems like a strange requirement: I have never really considered Emacs (or Lisp) to be particularly Unix-like at all! I think the plan 9 people would probably tell you to ditch Emacs and use acme (Me personally, I say use whatever you want).
Emacs inside is very unixy, under a particular angle. Everything is a list, a ton of small composable functions doing one thing well, one common language that unifies all key interfaces, and the general lack of a predefined final construction, but rather a bucket of Lego blocks around a kernel which does the heavy lifting.
Acme us interesting, but pretty different; its automation is apparently written in the shell language using normal OS commands. AFAICT the Plan 9 shell lacks structured data types comparable to Lisp's: it has lists, but not nested lists, so such constructs are a bit less robust. Also, AFAICT, Acme actively wants mouse operations; I hope reasonable keyboard equivalents exist.
I'll explore more of it in my copious free time (sigh).
Having a lot of small composable functions and a lot of singly linked lists describes most functional programming languages though. I think that's only one part of the traditional Unix design. Though to me it was always seemed like the inspiration goes the opposite way -- it seems like Unix was in some ways designed as a "Lisp-like," where the shell works as a somewhat restricted version of functional programming that only operates on one data type.
I realize that I don't really have any right to complain about this. I don't contribute to either project, and I think that maintainers should feel free to do whatever they think is best for their projects, including things that help reduce burdensome things that they find annoying.
However, as a heavy user of both projects, I see what those decisions have led to in practice, and have opinions about what this might mean for the community in the medium/long term. The reality on the ground today is that you either run systemd+udev, or you run OpenRC/something else + eudev. And having observed other projects that went down the "we forked, but merge regularly to try and keep the forks in sync" rabbit hole (e.g. ffmpeg and libav), this almost always ends badly.
The goal may be to keep the two separate projects compatible, but inevitably environment differences, bugs, refactors, etc. cause the two projects to diverge. This sucks for everybody, but it sucks a lot more for people using the less popular fork, and this can eventually kill the fork. I worry about eudev long-term.
So that really seems to be the core of the problem to me: nobody really wants to seriously maintain udev as an individual project. It's not a fun or glamorous project to work on, it's boring, nobody will notice it unless it breaks, and nobody really seems to care that it depends on libsystemd. For most people this is just an implementation detail. For an embedded distro I can't see why you would use udevd or eudev, you probably want a much simpler device manager without the giant hwdb.
Not sure why you're saying that -- moving it to a library is basically what happened. The libudev code got moved to libsystemd, and now libudev is a wrapper around that.
> Not sure why you're saying that -- moving it to a library is basically what happened. The libudev code got moved to libsystemd, and now libudev is a wrapper around that.
Oh, so now one has to include "libsystemd" if one wants to use "udev" - is that what you're writing? Hence the original comment:
> By devouring the udev project, the systemd maintainers have guaranteed that dealing with USB devices on non-systemd systems was going to be a giant pain.
I don't understand, is this not what you were asking for initially? libsystemd.so is just a shared library, it's not any more of a giant pain than any other library.
Because that would not reduce code duplication. I don't know if you have ever worked on any of the low-level Linux libraries written in C, but the amount of unnecessary code duplication across them is awful. The standard library features provided by glibc are extremely inadequate for modern applications, every non-trivial C project I've seen starts to include their own private implementations of various C++ things like hashmaps, binary trees, dynamically sized strings, unicode support, async event loops, etc.
For utilities that have to interact with low level kernel APIs it's even worse, every library seems to have to reimplement their own parsing of various other random things like netlink, or in the various pseudo filesystems like sysfs, procfs, cgroupfs, etc etc, the situation is really way out of hand. I don't know how to solve this in a reasonable manner beyond what systemd is already doing. Yes people will complain that they have a systemd dependency now but what else can you do? This is the exact reason the BSDs update the kernel, libc, init and core utils in tandem and consider a lot of the kernel API to be private, Linux was just slow to catch on in that regard.
I don't want to call you out for making a disingenuous argument, but it was either subsumed by systemd for code duplication reasons, or it wasn't?!
Duplicate code, could be refactored out to a shared library, that could then be incorporated in both udev, and systemd. That would mean, anyone looking to incorporate udev into a system, could do so without depending on libsystemd.
Instead, it would seem udev code, has been subsumed by libsystemd (in your own words) - which would appear to the sceptical eye, as a power play on the part of red hat - to force other distributions into using libsystemd, which would logically end with them also using systemd itself.
> I don't know if you have ever worked on any of the low-level Linux libraries written in C [...]
The issue is not with the actual udev device event logic itself, but with all the other bits I talked about. Those are the things that would need to be duplicated.
>to force other distributions into using libsystemd, which would logically end with them also using systemd itself.
As I said elsewhere, libsystemd is just a library with some generic functions provided for convenience. This is like saying that installing python libraries on your system logically means that the PSF is trying to take over your system and forcibly rewrite everything in python, it doesn't make any sense.
Why can't there be a libredhat that provide these things to the community with a stable interface?
Lots of communities manage to have widely used data-structure and algorithm libraries that aren't closely in the same repo as other unrelated projects, is there some special problem with this kind of systems programming that prevents that?
Does it really make a difference whether it's called libsystemd or something else? If you're talking about the other functionality that's private and unstable, it's not included in a separate library for exactly that reason: it's considered private and unstable (Also I'm not sure if you're joking with that name but I really doubt there would ever be something like this literally called "libredhat," that makes about as much sense as putting a random b-tree implementation in a library called libubuntu or a libgentoo).
>Does it really make a difference whether it's called libsystemd or something else?
Probably not. But when I think of something named "libsystemd" I think of a library to interact with systemd, not a collection of random hashmap and B-tree implementations.
> If you're talking about the other functionality that's private and unstable
Why would I talk about factoring out private and unstable code into a shared library.
But if udev is depending on that private and unstable code I do have a lot more sympathy for the packagers who are wary of the merger. It's kind of disengenuois to claim that they're totally separate projects, and can reliably be deployed separately when they both depend on some private special sauce. Even if the sauce is open sourced.
> Also I'm not sure if you're joking with that name
Half a joke and half trying to avoid the "I hate the name" problem.
You have clarified a little bit of what that library is actually doing. And why it seems to make sense to have udev pick up the dependency. Thank you.
Sorry I wasn't clear -- most of the stuff I was talking about (hashmaps, b-trees, parsers, low-level utility functions, etc) is the private and unstable stuff, in the sense that it's a little too specialized towards systemd's style of C coding to warrant making it a public API, but it's useful enough to be shared between all the systemd components including udev. That's all the "private special sauce" is, it really doesn't make it any harder to deploy separately. They're not totally separate projects but there also is nothing really in common between them besides the build time dependency. Does that make sense?
You're assuming libsystemd does things which it doesn't. Saying there should've been a libudev says enough. Too much assumption the lib does loads of things around the init system part of systemd. The unneeded dislike of the library is exactly why I used to make fun of the Devuan project. Loads of decisions that pretend to be made on a technical basis, but are actually mostly emotional and "gut"-feeling.
I think you're confusing me with another poster in this thread.
I'm mildy "not a fan of systemd" in that my minimalist sense of what a "good" system is is bothered by it and it doesn't pass my "gut-feeling" but I run way more systems with systemd than without so...
The way this whole thing is divisive fascinates me though. Systemd seems to work, and work fairly well, but also attract phenomenally loud detractors. I can't think of any other piece of software that does that. Not even PHP triggers as much back and forth. This whole udev and libsystemd thing is one of the only arguments that seems technical to me.
No, you just categorically don't understand. libsystemd is not systemd the init system, it doesn't require systemd to be running, it is simply the name of "the shared library that everything developed under the systemd project uses for common code." Now, you can argue until the cows come home that you'd be happier if udev, systemd, and libredhathatesyou (or some other name for libsystemd that doesn't include systemd in it) were all in different Git repos, but since you can run udev without a dependency on systemd running on the system, that seems like a pretty low-stakes dispute.
Of course I understand, as do the rest of the people not employed by red hat upvoting me.
Time and time again, I've seen systemd advocates making slippery, disingenuous, and outright false arguments. When they're called out on it, the goalposts magically move, a rotation of usernames appear to downvote and brigade which can be ascertained through downvote timing correlation. When they can't win an argument through facts, then they make bogus arguments that one doesn't get it, or some such nonsense - or claim they're a red hat conspiracy monger.
Seeing it over and and over again is lame, and played out.
Now, why don't you answer the question - if udev was subsumed by "libsystemd" as is claimed due to "code duplication" - then why did they not just include "libudev" as a dependency for "libsystemd"?
Of course, the question will never be answered, as it'll reveal the truth.
> Of course I understand, as do the rest of the people not employed by red hat upvoting me.
That's a really poor argument you're making. You've only repeated things you've assumed earlier without actually responding or seemingly trying to understand what the other person said.
Libsystemd does not contain init system type logic. You're assuming way too much. There's too much blind hate. The suggestion that people are likely employed by Red Hat as a reason that they don't understand says enough.
Too much emotional responses to the systemd name, too often people use poor arguments and reasoning, while saying it is the other person that is lacking in their reasoning.
The code savings from including udev in systemd turned out to be greater, as there was more re-usable code already written in systemd. Please be the better person and don't revive this flamewar, it's not helpful, let's stick to the technical facts and work together to find the answers we seek -- for example you can look at the git logs to see all the shared functionality and the code that was changed around: https://github.com/systemd/systemd/tree/main/src/udev
This thread got me thinking about all the unix systems I've used, admin'd, and fought with over the years, and I suddenly remembered a system I used the early 90s when you couldn't mv a file across filesystem boundaries because what that actually was was really a copy-and-remove and not just a rename, so it was outside mv's domain.
And that's what 'the Unix Philosophy' means to me, and why I consider it not worth much.
> This thread got me thinking about all the unix systems I've used, admin'd, and fought with over the years, and I suddenly remembered a system I used the early 90s when you couldn't mv a file across filesystem boundaries because what that actually was was really a copy-and-remove and not just a rename, so it was outside mv's domain.
Many similar problems like that is exactly the reason why many systems had GNU tools installed; and "GNU's Not Unix!".
I love Gentoo and really like they chose to make eudev and a elogind so I can continue to use OpenRC, which has been working great for me since forever.
Don't get me wrong -- I too am extremely grateful to the Gentoo devs for maintaining eudev. It's also the obvious choice for highly memory constrained embedded Linux systems that can't fit systemd. I just think it's absolutely bonkers that it has to be a fork... eudev should really just be udev.
> But the one thing that still really pisses me off about systemd-the-project was the fact that they ate udev-the-project. In my view, that decision was unnecessary and was done for purely anti-competitive reasons.
The developers of udev at the time agreed to merge to the project into systemd, as it made a lot of sense to them.
There was no "devouring", no "anti-competitive" bullshit.
Given that at the time of the merge the developers of udev were the systemd developers, "agreed to merge" seems like an odd presentation of that particular piece of history.
Why? You're saying it was pushed. But actually the maintainers agreed. Further, the maintainers overlapped. Instead of acknowledging that it wasn't pushed because the maintainers overlapped you make up "anti-competitive" behaviour.
I work for a company where every year there is a mandatory refresher on anti competition laws / behaviour. The suggestion that this is done for malicious purposes is highly offensive, yet so easily stated. This without actually going into a lengthy and thorough explanation. I think you're failing to understand how offensive you're being towards these developers. So easily using very harsh words, so easily dismissing what anyone else says, plus what the developers said. Yet not actually proving any good proof for your statements.
> But the one thing that still really pisses me off about systemd-the-project was the fact that they ate udev-the-project. In my view, that decision was unnecessary and was done for purely anti-competitive reasons.
Such are all the common criticisms on systemd.
It was never a technical objection; it was a political objection to the fact that systemd unnecessarily coupled things that could and should be separated, but were coupled not for technical reasons, but for anticompetitive ones, and this goes beyond systemd.
Many Red Hat projects have a way of finding themselves to be dependent on one another in ways that are often hard to justify from a technical standpoint, and often even use unstable, undocumented interfaces that they make available for one another.
How about the technical standpoint of having loose coupling everywhere is bug prone and hard to maintain? Will you create a public API that you will break at each update? That’s not too different to what is the state now.
Should you carry around 10 years old baggage APIs or what exactly would you propose?
Are you being sarcastic? The DHCP bits are entirely optional. You can either use it, or not use it. The code is useful in some cases, not useful in others.
Saying that some optional code has issues as a reason to not just use something else, but as a reason to not use the project: not logical.
Try getting Nintendo to do a DHCP with systemd, you can’t.
Nor with Juniper DHCP server configured by Comcast and Verizon, you can’t.
Hence, ISC dhclient remains.
I have a system where systemd decides, about half the times I boot it, to immediately unmount all of the filesystems listed in fstab literally right after having finished mounted them as part of the regular boot process. All of this with other daemons starting in parallel.
It will fail to unmount most of the filesystems, since they are of course busy, but often it will succeed in unmounting /var, /tmp, /home and others. Then it will continue starting on further services as if nothing happened and even proceed to gdm. But of course without /home I can't even login.
That's super annoying. I've experienced similarly frustrating boot problems when I had some FS corruption causing /var fsck to fail @ boot.
Despite dropping me to a rescue shell, systemd entered a continuous loop of retrying fscking /var while I was attempting to identify and fsck the problematic filesystem.
Few things are more infuriating than having your system drop you to a rescue shell, while it continues to endlessly change the state of the system - and not just any state, but the very area you're in the rescue shell to investigate and resolve. It just kept making /var busy while I kept attempting to manually fsck it...
I would run systemd-analyze critical-chain and then systemd-analyze blame to see if there is a service that could do this. And then I would look at the detailed boot logs. If nothing can be found, I'd look for some way to increase the log level.
If you are not curious, reinstalling everything could be quite fast too, depending on what you have installed.
The logs are mostly useless and random. There is nothing that consistently appears between the point where it finishes mounting (lots of "Mouting...", then "Reached target Local File Systems") and where it starts unmounting ("Stopped target Local File Systems", then lots of "Unmouting ..."). Sometimes these two lines are less than one second apart. But I haven't found any message which is consistently between these two points that would point to a suspect.
And this is not a problem that happens on every boot, so it doesn't show up on analysis... not to mention that most of the analysis is designed on trying to reduce boottime, which obviously is no help (thought it is rather fast already).
It is rather easy to guess why a service is starting, but not why it decides to stop 'orderly', much less why a .target decides to stop...
Most certainly you can only analyze things on boots where the problem appears, unless logs are persisted across boots.
Indeed systemd-analyze focuses on boot times, though I find it is useful to get a list of services that are run.
If you are adventurous you could probably replace the umount (resp. the systemd-umount) binary by a script that runs umount (resp. systemd-umount), and also prints the process tree (and its PID) in some file so you can get insight on what ran it.
> But on a normative level, perhaps a project that doesn’t want to support users shouldn’t have subsumed a huge swath of user land things?
It's not that the project doesn't want to support users in some absolute sense, it just doesn't want it happening in github issues.
The project provides the systemd-devel mailing list for that, but it's still preferred that users stuck on old versions determined by their distro's release cadence seek support from their distro vendor. It's likely such slow-moving distros are patching their LTS versions anyways, and are best positioned to support what they ship.
If this is a bug in systemd it belongs at systemd no matter which version it is. If systemd doesn't want to do support that is their choice but distros aren't the right place to post systemd bugs. It only belongs there if it is either a bug in the distro itself or a support request for distro specific problems.
If you go filing bugs against old versions of systemd in the github issues, you're likely just going to receive a canned reply along the same lines of what I've already said.
You may not like it, I'm just playing messenger here, to try save some bother on both sides of this subject. Use the mailing list for support questions, or contact your distro vendor for support.
This is a common error even back in the Sysvinit days. /dev/disks/by-label is not guaranteed to map the name labels to disks on every boot, and it can change with boot timing based on the storage controller behavior. Use /dev/disks/by-uuid instead.
/dev/disks/by-label is a legacy from the old days of systems with static disks wired in a specific, unchanging configuration.
You've confused by-label with the kernel's device nodes (e.g. /dev/sda1). Kernel names are assigned in order. Labels are just like UUIDs and part of the filesystem.
However, unlike UUIDs they don't necessarily exist, are not as likely to be unique (you should only get duplicate UUIDs by cloning filesystems) and are easier to change. This makes them less suitable for mount configuration.
Long time ago now, but we had disks just unmounting and mounting at free will.
As someone said by-label is not stable and could be changed, causing problems. We still use it though but not in customer facing servers where these problems arise. Maybe related to lvm/snapshot etc.
Deactivate graphical boot screens (often just by pressing Esc), increase the log level[0] and try to read the logs somehow. Maybe you can still log in as root. If you cannot log in as root even, but networking works, configure rsyslog to send your logs to another host and read them there.
if you can't login as root, you can try to put bash as init (with init=/bin/bash in the kernel boot command line) to inspect the system. Might be difficult on some systems (with SELinux?)
I'd rather recommend booting a liveCD. grml, knoppix, whatever floats your boat. An init=/bin/bash shell needs quite a bit of knowledge to get working (mount rw, get rid of selinux, mount the real rootfs), is possibly just busybox and generally a pain. Even more so if you need the net to copy something over.
It isn't impossible, and OK in a pinch, but why make it hard on yourself?
Have you tried increasing the log-level in /etc/systemd/system.conf? You can also set LogTarget=kmsg if you have issues with the journal. You can also control this with the kernel command line if you prefer https://www.freedesktop.org/software/systemd/man/systemd.htm... You could try a kernel command line like this 'systemd.log_level=debug systemd.log_target=kmsg' for instance
You can also look at systemctl list-dependencies local-fs.target to see if it has any failed dependencies
You can also use systemctl show local-fs.target to sanity-check it to see if there are any local modifications to the target that are breaking it
I'd start by looking at the systemd unit files in /etc/systemd/system. Beware of service wants.
I had straight up errors in a network unit file that caused weird behavior (IP address disappearing). This was a long time ago though. Sometimes moving a unit from one target (graphical) to an earlier (multiuser) solves the issue.
You might also have "defaults" in /usr/lib/systemd/ to compare with.
systemctl and friends are really good tools for troubleshooting but takes a little while to get used to. Duck duck go is your friend.
Finally, some volume technologies like VDO requires a x-systemd.requires statement in fstab.
Systemd generates mount units for the filesystems listed in fstab. Maybe check those with systemctl status? (Like `systemctl status -- -.mount` for my root partition)
Sadly no. The problem is that the entire local-fs.target is stopped 'cleanly' but with no clear reason. i.e.
$ systemctl status local-fs.target
Active: inactive (dead) since [...]
21:12:56 ... systemd[1]: Reached target Local File Systems.
21:12:57 ... systemd[1]: Stopped target Local File Systems.
Yes, the log just shows it stopping one second after being started, nothing happening inbetween, and no reason given for it being stopped.
Incredibly enough, local-fs.target is a dependency for graphical.target, so the system should not have continued booting. But not only it has continued booting, systemd even thinks that it finished booting all-OK. State is "running" (not "degraded" as it would be if any service/mount failed), with 0 failed services. Even though both graphical.target and local-fs.target are 'dead'.
It is at least built in a logical way and once you understand that logic then related commands will be discoverable.
`systemctl` is the systemd command line tool for inspecting and manipulating services/units.
`systemctl status` is the command for showing the status of a service or unit.
The `--` part is not specific to systemd at all, it's used in many commands to separate flags from positional arguments. This lets you use positional arguments that might happen to start with a dash without them being interpreted as flags. [1].
systemd manages mounts, they're named according to the mount point, with a transformation to turn it into a filename (mostly converting slashes to dashes, plus a .mount suffix). Hence, the root mount ('/') is named '-.mount'.
The annoying part is that now that '-' stands for '/', you need to use '\x2d' for '-'. Which is pretty annoying when manipulating mount names during the shell.
I wish they had picked ':' for '/' instead of '-'. That one would be pretty uncommon to find in a mount path, and has a bit of precedent on OSX.
(Who would ever mount anything on a path with a colon anyway? That would be as silly as using slashes instead of dashes for options)
Fair. I think it's because systemd lets you use slashes in unit names, but you can't represent those as files so you have to use a dash instead. This is the worst for the root filesystem mounted at / since that's the entire name. In systemd's defense, it warns you when you try systemctl status the normal way.
Hint: to specify units starting with a dash, use "--":
systemctl [OPTIONS...] COMMAND -- -.mount ...
I found my mount names by running systemctl list-units, so it's not something I had to look up.
You can use systemd-escape(1) to have it generate the correct unit name for you, e.g.:
systemctl status $(systemd-escape --path /home --suffix mount)
Yeah, complicated and verbose, but reliable and integrates into systemd mindset very well.
That to me reads as "show me the status of all files ending in .mount in the current directory". Once you start hijacking shell metacharacters you're on dodgy ground.
> Where *.js isn't using the shell glob feature, it's just a regex compatible string.
Except it isn't, because a `*` at the start of a regex is invalid. `-name` patterns given to `find` are explicitly shell glob patterns. You might be thinking of `-regex` patterns, which GNU find also has.
It's a bit shonky when `find` does it because it's not saying "the shell pattern applies in this directory", and I regularly trip over it. It's something special you've got to know about how `find` works, but at least it's still anchored to the idea of being searched in a path that's also part of the command. There's a semantic link there.
With `systemctl status *.mount` you've not even got that. What path is being searched for `*.mount` files? Is that path part of the `systemctl` interface? Or is this just another way that `systemctl` insists on being a special snowflake that someone's decided I now need to devote neurons to?
> If that happens again I'd try opening a virtual terminal, login as root and check logs.
If the system has unmounted all the drives, there won't be any logs. This happens often enough with systemd / journald to be a big source of annoyance.
The only option you get is to tell systemd to boot in debug mode but that fundamentally alters the timing and behaviour of so much that it often stops the weird behaviour from ever happening (similar fun can be had with `dracut` where enabling debug tends to stop any race condition from ever happening)
Note systemd does dump its own log to the kernel ring buffer until journald starts (the last message I see on the kernel ring buffer is Started Journal Service). It's no help though when (as in my case) journald starts but then has /var unmounted below its feet. I can write a script that keeps /var busy though, preventing it from being unmounted.
I don't agree with her sentiment that alpine should adopt something similar. The whole reason I use alpine is because it doesn't use systemd.
I like alpine because it uses a simpler, lighter approach. It's not for everyone, and I'm pretty sure alpine maintainers don't intend it to be for everyone. It serves its niche really well as it is. For those who like systemd there's many distro choices already.
Edit: As detaro mentioned in another comment ( https://news.ycombinator.com/item?id=27176391 ) they are actually working on something, but they aim to solve the various issues around alpine that don't fit well with alpine's philosophy. It sounds like a good story and I'm open to this idea. The main reasons I don't like systemd are its complexity and its dbus reliance, basically bringing too many desktop paradigms into all Linux systems, even servers and containers.
So about my above point: I'm open to it adopting a service manager but not too similar to systemd :)
> By not having something competitive Alpine is less and less attractive for newer production deployments.
Alpine uses OpenRC (https://wiki.gentoo.org/wiki/OpenRC). IMHO Alpine and OpenRC tend to make production deployments more predictable and reliable, because of deliberately simple init ordering, as well as a smaller surface area as compared to systemd.
According to that page "the main reason Alpine aims to replace" OpenRC is they want the init system to "interface with external events". Huh? The thing I like about OpenRC is is if I `grep -R socket` on its codebase then it comes up empty. Alpine seems to be leaning towards s6 according to that page, which appears to have a treasure trove of network services. Last thing I want is to wake up one morning after updating Alpine and have all these scampering daemons like skadnsd, s6-fdholderd, s6-sudod, s6-ipcserverd, s6-ftrigrd, s6lockd, and ucspilogd skulking in the background. Also the boldness of the name. If you name it System 6 then you're claiming you've built something better than Bell System V. The init process has total power over the rest of userspace. I'm sorry but I don't think your system administration paradigm that MiTMs DNS deserves to be /sbin/init. I just want a UNIX-like system with few opinions that stays out of the way.
Those last four s6-* programs are not daemons. They are chain loading programs that modify permissions or the environment then exec into the next program in the chain.
To be frank s6 and its cousins like runit have so much fewer lines of code -- I'm pretty sure it's fewer than OpenRC and traditional SysV both -- because of simple and thought-through architecture. If you're gonna do a systemd alternative at all, ever, it'd have to be on one of these sane foundations.
Interesting, I have a lot more faith in the alpine team implementing something like this than in RedHat. Even when RedHat made consumer OSes (before spinning them off to Fedora) I didn't like them.
What they're doing looks like a great alternative. I also hope they will not have any reliance on dbus as systemd does. Reliance on dbus is one of the main issues I have with systemd (besides its size and complexity).
I've seen a lot of these comments to this effect but I'm still not quite sure: what is the issue with dbus? Is there another replacement that meets all the use cases?
Can you elaborate? I found it very easy to interact with once I learned how to use the tooling (busctl, d-feet, etc). I also don't think I would say it's desktop-focused, it was designed for that use case originally, but it seems it can be used by anything else that happens to use a similar OOP-based RPC design (and it seems systemd is one of those things). Is there another replacement that's of a smaller scope that would cover all the use cases that systemd needs?
Question is if an init system needs all the use cases dbus can support. Dbus always feels unwieldy to work with, especially once you leave specific desktop stacks, and for me personally, the biggest failures of systemd-based systems have been issues with dbus not working properly for whatever reason.
I don't know the status of this on a practical level (e.g. in any given distro) but systemd does support daemonless dbus access over a private socket (/var/run/systemd/private) in some scenarios. Would that help?
Okay, I'll admit I was hoping for a blank web page :-). Not a fan.
I always ask ""What problem is this trying to solve?" and then "Is this a good solution for that?"
I appreciate the "startup dependency problem" and when I was in the Systems Group at Sun we worked with AT&T on their solution which was the whole "run level" thing.
And I appreciate the whole "shell scripts can do anything" problem that just using a naming scheme on shell scripts to run can lead to unexpected behaviors.
From an architectural taste perspective, I prefer systems which are more comprehensible in parts and thus don't try to abstract out semantics to the point of incomprehension.
So at the end of the day, something with a better model, better visibility into its operation and configuration, with a way to validate and debug dependencies would be good. But I haven't been impressed with systemd.
* It gets rid of a system cobbled together from init, inittab (which people rarely remember exists), monit, cron, and inetd/xinetd.
* It removes a bunch of horrible hacks in init scripts such as calls to sleep.
* It removes the need for pid files.
* It removes the need for a lot of stupid boilerplate, like the whole start-stop-daemon stuff in scripts.
* It allows precisely tracking what belongs to each service. I can easily find out what a random process belongs to.
* It captures all the log output of each process
* It drastically improves the upgrade process -- I never need to look at a 3-way diff of /etc/init.d/apache2 again
* As a developer it means I don't need to write a slightly different script for every distro
* It makes logging a whole lot pleasant
* It allows having user services without having to hack around it with cron
* It allows a whole bunch of settings to be applied to any random service, without having to edit a shell script and figure out how to stick it in there.
* It means services run identically when started by hand, without the confusion of a service inheriting my local environment.
* It makes my VM servers boot faster. And if you're going to pipe up with "I reboot my servers once a year", that doesn't cut it for me. I boot my servers on demand, when they're needed. They adapt to the load.
I had to chime in here and say I really like this post, thank you for taking the time to write it out. I would give it extra up votes if I could.
It is a nicely concise summary of the problems. I'd disagree with the characterizations of the previous system as "cobbled" or "horrible hacks" but there are solid things that need to be solved well by any system initialization architecture/service.
For me the key idea is that they don't all need to be solved in the same place, by the same project. Implications that the systemd approach is the only way to do so really rub me up the wrong way.
Out of curiosity, what would you do if you had the inclination and the know how for solving all of these issues? Would you create a project for each of them or unite them under a single one like Lennart did?
Of course, with both of these workarounds, the semantic changes from "start this process once the user logs in" to "start this process once the desktop environment starts", but the end results are identical for almost all users.
> the slackware guys came up with an elaborate solution that wraps the pipewire command with a daemonize tool that is supposed to cleanup after itself
You mean Slackware users on some random forum. Besides, the solution they came up with uses XDG autostart which has nothing to do with systemd. Not to mention that it's not even doing the exact same thing as the Gentoo solution and running two more commands in addition to pipewire. On top of that, Gentoo also seems to be using XDG autostart for Pipewire[1] so it's basically the same approach.
Believe it or not, that's actually the official slackware forum. And whatever solution those guys come up with, it will likely become the official solution.
> Besides, the solution they came up with uses XDG autostart which has nothing to do with systemd.
The slackware solution involves a project that nobody has heard of before, just so it can imitate the "user-level service" feature provided by systemd: https://github.com/raforg/daemon
> Not to mention that it's not even doing the exact same thing as the Gentoo solution and running two more commands in addition to pipewire.
The slackware solution requires starting those 3 processes (pipewire, pipewire-media-session, pipewire-pulse) separately from 3 different .desktop files, likely because the daemon tool above can't properly reap the pipewire-pulse process (not sure whose fault is this though).
On the other hand, the gentoo solution can start all 3 processes with just 1 .desktop files, because `pkill` takes care of it. Simple and effective.
I think the key difference, in this case, is that the slackware guys are trying their best to imitate a systemd feature, while the gentoo guys seem to focus more on finding the best way to allow users to enjoy pipewire.
> Believe it or not, that's actually the official slackware forum.
My bad. TIL.
> The slackware solution involves a project that nobody has heard of before, just so it can imitate the "user-level service" feature provided by systemd
Daemonizing processes has been a thing far before systemd even existed. Solutions similar to this "daemon" project are commonly employed in SysV init scripts. If anything, systemd made those things irrelevant by offering a more simple configuration to daemonize programs.
> The slackware solution requires starting those 3 processes
> On the other hand, the gentoo solution can start all 3 processes with just 1 .desktop files
It looks to me Gentoo doesn't start the other two processes. I don't see how "daemonize" or pkill is relevant here.
> slackware guys are trying their best to imitate a systemd feature, while the gentoo guys seem to focus more on finding the best way to allow users to enjoy pipewire.
With respect, this is a unsound take. The explanation is more simple and it's that Gentoo does not currently handle pipewire cleanup.
> * It drastically improves the upgrade process -- I never need to look at a 3-way diff of /etc/init.d/apache2 again
lol. I had to trash an Arch Linux box because it failed to upgrade systemd from 208 to 211. Everytime I upgraded the system hung trying to mount filesystems so I had to roll back.
You’re complaining about something different. If there’s a bug in systemd itself that makes your system unbootable then not much you can do except not upgrade. What the parent is talking about is the fact that services are organized into base service files and overrides. Base files live in /usr and are to be modified only by the package that owns them. Override files or full-replacements live in /etc which is for the local administrator. Service updates are now always a safe operation.
How much faster do your VM servers start with systemd?
On the desktop, I feel like boot time is slightly longer than it was 20 years ago, yet hardware is faster now. I used to shut down my computer every night back then; now I leave it running, because it takes so long to get back to where I left off.
> now I leave it running, because it takes so long to get back to where I left off.
I think it takes my Linux system ~13 seconds to boot? That is definitely less time than it took 20 years ago, but I think that's mostly b/c the storage is no longer slow spinning rust running on IDE cables more than anything else…
Returning to state is what takes time, not the boot process to login.
It's Monday morning at 10:30, I've already got 29 tabs on 3 windows across 2 virtual desktops (2 monitors each) running on my main desktop. I've trimmed down to just 30 various rxvt windows with ssh or vim open, with files and notes at various stages of completion.
Some tabs may restore next time I load my browser, some won't.
It's because of this that I've started to do everything in VMs. I can always save state and pick up where I left off without worrying about losing anything.
SystemD solved enough problems that such a large number of distro owners switched to it that one of the biggest complains against it is how prevalent it is.
> when I was in the Systems Group at Sun we worked with AT&T on their solution which was the whole "run level" thing
Interesting that you mention Sun. Didn't SMF precisely replace runlevels with SMF milestones[1] in much the same way systemd replaces runlevels with target units?
>I appreciate the "startup dependency problem" - except systemd doesn't actually solve this problem.
Good to see people down-voting a completely factually correct statement that they don't believe and don't want to personally investigate. Go read the systemd sources or read any article analyzing how systemd does dependency based startup and see for yourself.
No, Upstart’s design was so bad that even Scott James Remnant (the creator of Upstart) admitted it’s design was inherently flawed.
The biggest problem with Upstart was that it put the dependency chain upside down and just started a service whenever it’s dependencies were fulfilled, no matter whether it actually made sense to start the service.
I remember reading about it and thought it seemed wrong, but presumably the author did his research and knew what he was doing. Oh well. His attitude and the readability of Upstart code were very good, though.
The Upstart design was probably easier to implement. With the systemd design, the dependency tree needs to be traversed bottom up (figure out what needs to be started to start the targeted set of services), then top down (start dependees when dependencies are ready). With Upstart, top down was enough. Or so it seems.
I for one have great sympathy for people who are placed in the position of having to give good reasons for using systemd. "All your distro are belong to us" was the original plan but it didn't quite work out. The shills had to scramble but they managed to make the best of a bad situation.
I've not seen even sysvinit based systems with this problem. Every service manager I know of solves this problem. This is as much an argument in favour of systemd as "don't have to clean up horse excrement" is an argument in favour of owning a fiat 500.
And yet, it still tries to use pidfiles (which systemd has a better alternative for), and notes "We really should check if the service is already going" which they don't do because it's an actual non-trivial issue if you're writing a standalone init script.
Does anyone use these init scripts? Every popular sysvinit based init system uses short declarative service scripts for most services. Every non-sysvinit init system seems to mostly manage with 2 line scripts.
And yes pidfiles are crap and I don't like them either (a genuine criticism of sysvinit and advantage of systemd) but systemd isn't the first init system to do away with pidfiles so it's hardly a unique strength.
Could you show an example of a declarative sysv-init script? To be honest, I'm not aware of it being possible and ddg doesn't bring up anything.
> Does anyone use these init scripts?
By default every popular distro before systemd/upstart did. Many services still use them anyways (systemd just generates a shim to run the start/stop/status operations on them)
> By default every popular distro before systemd/upstart did. Many services still use them anyways (systemd just generates a shim to run the start/stop/status operations on them)
Honestly I wouldn't be surprised if much of the negativity surrounding systemd (other than people who don't like the architectural approach) is from not being able to use a clean startup configuration, instead having to use a bolted-together compilation of startup methods under the systemd "brand".
It's been a while since I've confirmed this with a new install, but while my Arch Linux setup is very clean, Ubuntu has always been a mess. It still has compatibility with the old "service" command (from Upstart I think?) for goodness sake. My Ubuntu install still has a ton of scripts running under the systemd shim, while as far as I can tell everything that is running on Arch has a .service file. If you're going to appreciate the value of systemd, the latter is a much better experience.
On an archlinux system running systemd I see that the equivalent of the rc_reload function is "ExecReload=/bin/kill -HUP $MAINPID" (which is actually less safe...)
I'm not sure if you think that's declarative but to me it's basically as declarative as you can make a shell script.
> By default every popular distro before systemd/upstart did. Many services still use them anyways (systemd just generates a shim to run the start/stop/status operations on them)
I mean is anyone CURRENTLY using them? Because as far as I'm aware the linux sysvinit situation was a gigantic mess which nobody wanted to bother fixing despite the fact that OpenBSD and other BSDs had already fixed it by that point.
I think most linux distros can be taken as an example of how not to do things if you want to make your life easier.
Nowadays BSDs don't use these awful scripts. OpenRC based systems don't use these awful scripts. Who is using them?
It's highly abstracted with macros, but that's not the same as declarative. It's still using full shell evaluation and any service can complicate it or make it slightly different. It's pretty close though.
> I see that the equivalent of the rc_reload function is "ExecReload=/bin/kill -HUP $MAINPID" (which is actually less safe...)
> man: "rc_reload - Send a SIGHUP signal using pkill(1) on the regular expression given in the pexp variable."
I don't understand why it would be less safe. $MAINPID is well defined because systemd knows the top process in that service's group. A pkill/regex by definition matches by text, so it can HUP any process with matching name - whether it was started by this service or not.
> I mean is anyone CURRENTLY using them?
Not that I'm aware of. They're still installed for people who don't have a different supported init system, but that's just edge cases these days.
It's less safe because it reloads sshd regardless of if the reload would cause sshd to fail to reload. It runs a config check of sshd before it goes ahead and asks sshd to reload its config.
I have 90 scripts in my /etc/init.d directory. 51 are less than 100 lines, the most recent one I created is actually a perl script which is 29 lines long.
Yeah, with the #!-lines, sysv init scripts can be written in just about anything and, as long as you implement the expected command line interface, the init system will handle it correctly.
Hmmm, I wonder if anyone has made program for this purpose that will read the rest of the file a declarative definition of a service? Like imagine a SYSTEMd unit file with a shebang at the top .
There's a bit of truth in that. The file format is underdocumented. You've got to look everywhere to find snippets of information, and then there are these weird incompatibilities between versions (Service.Type bit me once, and either After or Wants simply didn't do what the scant information suggested). And it often starts a script or a dedicated tool, e.g. for backing up, or watching directories.
However, it's easier to deploy and keep track of your own services, sudo and chdir are built in, there's a watch dog, easy journaling. That's nothing to sneeze at.
I’ve written a handful of systemd units now and, while the simple cases are nice, anything more complicated is really hard to figure out by reading manpages or other official sources of documentation. And, additionally, I’ve found it’s often easier to write a shell script to be invoked by systemd than to handle certain issues in the unit file itself.
As far as the watchdog but things go there’s plenty of good enough solutions that don’t really on systemd: daemonize, DJB’s daemontools, etc.
I've written many systemd services, and other units. Some of which were quite complicated. I found the man pages extremely useful. Moreso than the manpages for sysvinit or upstart, when I used those systems.
Hey, thanks for the great talk, I often type something like "journalctl -xfe" and just get completely lost, you mentioned that's out of scope for this talk but do you have a recommendation for some hints about how to use journalctl effectively?
* Want only kernel logs? journalctl -k or journalctl --dmesg
* Want to filter the output right away? journalctl --grep=some_regex
* You booted a live environment, but want to look at the installed OS's journal: journalctl --root=/path/to/mounted_root or journalctl --directory=/path/to/journal
* Want to look at the logs from a container you booted using systemd-nspawn (and friends)? Just use journalctl --machine=container_id
* What time intervals do the boot indices (for -b) correspond to? Look no further than journalctl --list-boots
I'd say journalctl really has a lot of generally useful flags.
I can't help but notice that most of these flags seem to solve self-inflicted problems that don't occur with plaintext logfiles. Why have a special grep flag instead of, yaknow, piping through grep? (A: because journalctl is slow). Why special flags to load different categories of log? (A: because all the logs are mixed together in a big blob). Why a special flag to load logs from a container, and another different(!) special flag to load logs from a mounted system? (A: because journalctl throws away the logfile metaphor).
I don't know what "boot indices" are, but your other commands with plaintext are as follows:
> Why have a special grep flag instead of, yaknow, piping through grep? (A: because journalctl is slow).
No, because it only matches the message field, so you're not grepping anything extraneous like the timestamp or service name. This is also convenient if you want JSON output, which includes a bunch of extra stuff | grep might match.
The performance argument makes no sense, because if it's slow, then --grep will also be. Any slowness is likely before things get to that point.
> Why special flags to load different categories of log? (A: because all the logs are mixed together in a big blob).
And that's a good thing, because it means you can mix everything together and see the interactions between the different parts of the system in the order they happened. And this can be achieved by logging everything only once, rather than having duplicated logs for such an use case.
> (A: because journalctl throws away the logfile metaphor).
That's also a good thing IMO because I don't really care about the details of log storage. Whether a log is named this or that, and is compressed or not, and if the data I need is in .log or .log.1 or .log.4.gz is all a distraction from my actual need -- seeing a particular set of data. The fact that I can just get the log files from Apache from a given date, regardless of what file that happens to be stored in is a good thing.
> I don't know what "boot indices" are, but your other commands with plaintext are as follows:
Per-boot log classification. You can easily ask for the logs since the last time the machine booted, or what happened during the previous boot, and so on. And the list shows timestamps, so you can tell at a glance that the machine last rebooted today, and has been rebooting every 3 hours as of late.
This is very useful if the machine say, crashed and rebooted at some point. So you can just ask for journalctl -b -1, which will give you the log of the previous boot until the crash. You don't have to do any grepping to figure out where is that in the logs, because the system can trivially give you that.
Except that whatever is absolutely not trivial to find. Is it per service/day? What if it was rotated before? How do you look at the logs from the boot before the current?
If it is per service, will you grep the service name? It will have many false positive lines. Raw data is not too useful.
I think we definitely agree on the most of the benefits - there's a transcript at [1]. I'm happy to see more people discuss the benefits and practical uses rather than the sea of hate that systemd usually gets (especially in these parts).
Eh, no. There is already a short list of viable non-systemd candidates. We.. well.. I don't need less. It already feels like I am transgressing some law by typing this on PopOS.
> If you need to reboot the server right now for some reason, will that service come back up on reboot?
I didn’t see this discussed more after it was asked, but I could use some pointers on how to answer this question since I have a service I wrote that I think should start on reboot, but has to be started manually. It would be nice to know when I have fixed it without having to reboot after each change to just to test. Anyone know how I can do that?
Problem with systemd is, startup is not deterministic. systemd starts everything it can start at the same time, leading to subtle race conditions between services and the network. If you have any dependency that isn't explicitly spelled out or any service that is falsely reported as ready, you will get funny system states on some boots, whereas it will work on others. systemd-udev does its part to make things even worse there, because it also introduces more races against kernel devices. So with systemd, even when you tested the system, you can not always be sure that it will start everything properly.
Compared to sysv-init this is a regression, because init scripts usually ran sequentially and also didn't involve unreliable systemd-udev events.
Compared to Solaris SMF this is pitiful. SMF takes into account service dependencies from its declarative service descriptions and computes a deterministic sequential startup order. If it has booted once, it will always boot again, in the same order, reliably. Best of all worlds.
> Compared to sysv-init this is a regression, because init scripts usually ran sequentially and also didn't involve unreliable systemd-udev events.
I find this really odd because we spent decades with that exact class of problems on SysV init, in part due to the primitive dependency model and the lack of standard mechanisms to launch daemons or react to events meant so many different reinventions of that particular wheel (need Apache to wait for NFS mounts? Here’s another shell kludge to maintain!).
Switching to systemd gave a single, simple answer for all of that: use the init system. I don’t know what services you manage but for the mostly Debian/RHEL environments I’ve worked on your description more fits the before state than after in my experience.
Apache waiting for NFS mounts is still not solved. Now Apache may depend on a file system, but it still cannot depend on "the LDAP is available so you can resolve the UIDs on that NFS". So we are a tiny step ahead maybe. But the problem isn't solved at all, and back in the day we just solved it by reordering Apache manually all to the back, maybe with a "check that UIDs are resolvable"-script in front. systemd can't do that (except if you allow "evil" shell-scripts in bootup again...).
1. We didn’t “solve” that back in the SysV days by reordering - mostly we just lived with the occasional race conditions and restarted it.
2. You could use systemd’s health check or pre-exec to handle prerequisite checks like this if you can’t use the dependency mechanism for some reason (there’s no reason why you couldn’t have a custom type=oneshot service set as a requirement for Apache).
There’s nothing “evil” about scripting like this - the thing which makes me tired of SysV is the limited standard feature set (daemonization, logging, restarts, dependencies, event handling, etc.) and challenges coordinating across distributions for things like overrides. The wheels fall off shell scripting when you need to deal with that much complexity and do so in a portable manner with a bunch of shell code you don’t control - a health check is far less tedious to deal with, especially since you have a ton of functionality in systemd which avoids the need to handle the hard parts.
In that sense, systemd doesn't solve anything for the same reason sysv-init doesn't. All those preconditions in systemd will still either time out or never finish.
The point is, back then I just moved the apache startup script to back, added a wait-and-check loop in that script and had everything in one place and done.
With systemd I have to rely on a dependency on some notoriously broken network-up-target, add a separate script with my wait-and-check loop to the apache unit, add a dependency on an NFS mount or maybe autofs and then hope I didnt forget something. Then notice that autofs units are usually broken because they exit too early (before they mount anything) and add a "sleep 10" unit in between. Now I'm at more complexity, a shellscript, multiple files and still not ahead in functionality and reliability. Progress!
> In that sense, systemd doesn't solve anything for the same reason sysv-init doesn't. All those preconditions in systemd will still either time out or never finish.
No, they will run until the configured timeout and be restarted following your configured restart policy. Once that's happened, all dependent services will automatically be started.
> The point is, back then I just moved the apache startup script to back, added a wait-and-check loop in that script and had everything in one place and done.
Nothing prevents you from putting a wait loop in the Apache systemd unit, either — in fact, it'll be a lot easier because you can use an override rather than needing to modify a packaged file which will be clobbered by updates.
> Now I'm at more complexity, a shellscript, multiple files and still not ahead in functionality and reliability. Progress!
It's interesting because you keep describing what sounds like the SysV experience, which I haven't seen since switching to Upstart/systemd over a decade ago.
I think the implication is that "systemd as designed" cannot do that, and shell scripts are a hacked-in solution. I disagree with this implication because the fact that systemd left that door open is enough for me, but I get where they're coming from.
But it is a mess. You'll need 2 files for that unit (itself and the shellscript) plus changes to all necessary dependencies to put it in the right place. A sysv-init script is just edited in the right place and you are done.
> A sysv-init script is just edited in the right place and you are done.
If you never intended to update the package, that owns the sysv-init script, that is.
If you do, you will find out at update time, that you have to manually play with 3-way diff and hope, that the init script didn't change too much. You are never done.
With systemd, you have an override, you don't change the original unit. It will update cleanly.
At best, ordered startup should be optional, since boot otherwise takes too long on workstations.
It would be nice to have hard errors when dependencies are not explicitly declared. For example, if you don’t declare dependency on the network, your service gets put in a sandbox where it can’t access the network at all. In practice, that kind of sandboxing sounds difficult.
My personal experience is that it is fairly straightforward to debug races in startup. Some service fails, you look in the log and see that it has a dependency that hasn’t started, and then add that missing dependency to the service’s declaration. Just speaking from personal experience—this doesn’t come up especially often and doesn’t require a large amount of time to fix, and the benefits of fast startup save you much more time than the extra debugging costs you.
I reboot my workstation about once a month, and I couldn't care less how long it takes. What I do care about is that my workstation actually reboots predictably. If it needs manual intervention when I'm traveling, I'm screwed.
It depends on the application. For laptops, sure, hotplugging stuff is important. For servers, not so much, reliability is far more important than getting your USB-stick automatically recognized. systemd is heavily skewed towards the unreliable but fast and dynamic laptop usecase.
A server won't have many udev messages happening after boot, (Past the drive and network cards) so it shouldn't hold up and services either. Have you got specific situations in mind that are not reliable?
Network cards aren't simply just cards anymore. Often you get multiple interfaces depending on each other, e.g. bridges depending on multiple ethernet interfaces which wait for STP delay to be over until they are really forwarding packets. VLAN interfaces that are dependent on their parent ethernet interface. VPN and other tunnels. So you get stuff like "start wpa_suplicant for 802.1x, take the ethernet interfaces up. start the bridge interface. check if DNS works for the VPN. then start the VPN daemon and the VPN interface. then start network services listening on the VPN interface". That would be a typical setup for a server in a remote office somewhere.
Another fun situation is a server with LVM, RAID and encrypted disks (also typical for a remote office somewhere). SAS disks will come online (after spinup time), generate an event. LVM and raid detection will run, generating more events, usually dependent on one another. Device naming is in some cases dependent on the event order, so you also have to rely on systemd-udev not fucking up by-id or by-name links. Then you have cryptsetup, which decrypts the disk, generating another event, but only upon an automatic or manual all-clear and password from the (hopefully working) network. Then you arrive at the actual filesystems in fstab, after a chain of udev events, each of which (and especially the LVM and cryptsetup ones) sometimes fails. Same "fun" for SAN devices.
Oh, and another fun problem is systemd exhausting randomness for too many UUIDs, so cryptsetup hangs for swap devices because those get a key from /dev/random.
Of course those bugs get often fixed over time, but only until the next RedHat release arrives with yet another systemd-somethingd, networkmanager, systemd-udev-bug that introduces another new problem in the above. Usability has gone up since RH7, but reliability is definitely down.
This is a long list of complexities, but I'm not sure how they relate to udev/systemd. Yes, setting up aggregate interfaces, VPNs and fancy drive configurations is complex and can fail due to various delays. That's not a problem with udev reliability if an underlying system fails. We had the same issues before systemd/udev was a thing.
> cryptsetup hangs for swap devices because those get a key from /dev/random
You can choose urandom (third column of crypttab). Systemd doesn't enforce anything here.
You wanted to know how many udev events and therefore dynamic behaviour a server could have at boot. I told you my experience.
And of course the underlying system may fail, but actually it is more common to have udev, lvm and systemd fail. Just google cryptsetup, udev, boot, lvm, raid and problem in arbitrary combinations. Most of what you will find are bugs in udev, lvm or systemd.
urandom is a workaround for stupid behaviour from systemd. Of course /dev/random isn't necessary, but that is beside the point, systemd again broke something by being boneheaded.
Being able to hotswap more components in the data center without power cycling the server is becoming more useful again (I say again because this was a long standing benefit of mainframes). More than just hard disks, it's useful for SSDs, and now GPUs and other types of accelerators. PCIe supports hot plug, but it's rarely actually used.
Not just mainframes, there was and is even RAM and CPU hotplug x86 hardware (but rare and expensive). Sun hardware (enterpricey, but not mainframe per se) had CPU boards you could pull and replace while running. Network cards and HBAs are other more typical examples of things you could hotswap. But the trend has favored software based solutions providing redundancy on multiple cheaper servers. Imho rightly so.
> If it has booted once, it will always boot again, in the same order, reliably
Or not if one of them fails suddenly. That’s just a false sense of stability (not saying it could not be stable, but that is not due to having a sequential startup)
Services should have proper dependency chains and that’s not that hard of a problem to overcome. Without them every other part of service management will be incorrect.
In the systemctl status output, it says "Loaded: loaded (...; enabled; ...)" - "enabled" means that the service starts on boot. Use "systemctl enable" to "enable" a service. It creates a symlink in /etc/systemd/system/multi-user.target.wants assuming the service's unit file says to enable it through the "multi-user" target. By listing that directory you can see what services load on boot.
Not exactly. Socket units can pull in services that are not otherwise enabled. You also have to search through all of your udev rules to check if there are SYSTEMD_WANTS directives pulling services in.
rav (correctly) said that enabled services are started automatically on boot. They didn't say that non-enabled services are not started automatically on boot.
You're right that there's a lot of nuance to the set up. I think listing that directory will solve the "it's 4:00 am and you want to know if nginx will start on boot" scenario, but you're right that you need to understand the system in more detail if you were to build tooling around it.
If it's enabled and starts from the service file currently, you can expect that it will start after a reboot. Of course you can never be sure it's successful, but at least it will attempt to.
I think systemd brought a lot of good stuff to the table, but I also think it's a sprawling mess with poorly named and documented (as in there are behaviors implied by statements in different config directive sections that make it hard to reason about how stuff works).
I'm looking forward to the successor of systemd, or at a minimum, them rolling out config syntax 2.0 which breaks compatibility in an effort to make stuff more sanely named and documented.
I know that would cause huge churn. I know it will never happen. But I can dream, because I don't think anyone can look at how systemd configs define dependencies and say that they both understand the nuances and that those directives are are named sanely in a way that normal people can understand, and that's indicative of a lot of stuff with systemd.
Even though it was probably designed by some of the most knowledgeable people WRT init systems, it grew organically as they discovered new things they needed, and it needed a lot (which I think just goes to show how little was really understood by anyone about how to tightly couple these things).
Yeah it's all pretty darn good. People forget the cluster of bash scripts, various cronz, inetd, log, and other supervisor type daemons all to do what systemd does better with a simpler config.
Now ask me about pulseaudio and there's a project with nothing but issues, looking forward to the new pipewire overlords.
> Now ask me about pulseaudio and there's a project with nothing but issues
Don’t forget Bluetooth, WiFi, and graphics (cough Nvidia). Or any peripheral, for that matter.
Until vendors stop forcing us to play games with their broken blobs, Linux will forever be just a grand experiment for frustrated hobbyists and unfortunate professionals around the globe. A digital tragedy of the commons.
>Linux will forever be just a grand experiment for frustrated hobbyists and unfortunate professionals around the globe.
Linux is the most widely used kernel in the entire world. If you consider 'Linux' to be the OS, it is #1. If you consider all distributions that use the Linux kernel, it is also #1, collectively and individually (Android.)
If you look at the ranked list of Supercomputers, Linux has the entire top 500.
I think it's fair to assume they were talking about Linux as a desktop OS, which for some reason absolutely refuses to learn lessons from the other 99.9% of the market. And is also infatuated with internal fragmentation despite its tiny usage. That makes it really fun as a hobby for sure, and powerfully flexible for datacenter usages (from the mundane to the supercomputers). But also pretty terrible as a "I just want my laptop to work reliably & well" OS.
> I just want my laptop to work reliably & well" OS
Which I had for the best part of 2 decades. Until systemd came along, infected pretty much every mainsteram distribution, and broke things that have always just worked like DNS.
Instead people decided "ooh mac is shiny, lets copy that". If I wanted OSX, I'd use a mac. If I wanted windows, I'd use windows.
for the desktop it helps to switch to ... osx. I think Apple has to thank systemd/redhat for its commercial success; I mean that a tightly coupled management system works fine, if every detail of the system is run by a single company. In this case a showstopper in any part of the system will have to be solved by that single vendor.
Actually Apple has its own launchd service management system, and that one doesn't try to handle stuff like logging or dns.
Apple changed the licensing of launchd to Apache license 2.0, but no linux distribution has adopted it. Ubuntu checked it out, but didn't use it because launchd used a more restrictive license at the time. Interesting that the license change didn't trigger a wider adoption of launchd. https://en.wikipedia.org/wiki/Launchd#History
Interestingly, upstart was inspired by the shortcomings of launchd, and systemd was inspired by the shortcomings of upstart. So in a way systemd traces it's lineage back to launchd.
Wikipedia says that google chrome os/Chromium os are using upstart, that would make it the only widely adopted distibution that uses a non systemd service manager. Well Alpine linux is using OpenRC, but alpine is big with servers or as base image for k8s pods, not as a desktop distribution.
https://en.wikipedia.org/wiki/Chrome_OShttps://en.wikipedia.org/wiki/OpenRC
in a way this would disprove the assertion that everyone has to use systemd, because of dependency creep.
I ignored systemd because I thought it didn't affect me, as I only run linux (fedora) on my desktop, and hardly had any issues at that.
But recently, when I changed my fstab file to mount a drive at boot, I made a typo. My system wouldn't boot at all and it wouldn't even drop to a shell so I can chroot the file system like you would with init.d.
I thought that there's some arcane command I don't know about. But there wasn't. You're locked off, and expected to boot off something else to fix your system. Horrible.
Having this said, I honestly expected way more on the section about benefits to users.
> But recently, when I changed my fstab file to mount a drive at boot, I made a typo. My system wouldn't boot at all
I don't know exactly what went wrong in your case, but killing Unix systems by messing with fstab has been a rite of passage for more than four decades. Systemd certainly didn't invent that. Hell, I broke a chromebook not 48 hours ago messing with the boot setup.
But FWIW: managing a recovery image is, amusingly, not historically a job systemd has tried to take on. This is what your live image is for.
Atleast on Arch, Systemd should drop you into the Emergency shell if it cannot mount a device that isn't defined as optional. IIRC it might require a root password to be set, however.
Otherwise, edit the kernel commandline to add "systemd.unit=emergency.target" to the end, which triggers systemd to straight boot into this console without trying anything that it doesn't need to bring up the console.
This will block systemd however. The nice thing about the emergency shell is that you can use systemd things like trying to mount filesystems. And you can later isolate multi-user to continue the boot when you finished your fix. /bin/bash would be atleast useful to try to get a root password set.
That usually indicates something is very wrong and might need an init=/bin/bash instead, as a last resort, to find out why it couldn't open the shell (usually, because there is no root password or it couldn't find any shell binary to run).
I'm using split horizon DNS with WireGuard on my systems (I mean using special DNS servers for some domain names and the public ones for the rest. Correct me if I'm wrong). I used to try systemd-networkd and systemd-resolved because they seem to fit together. I found systemd-resolved is extremely buggy with systemd-networkd managed WireGuard. My WireGuard endpoints use domain names and systemd-networkd fails to resolve them after a manual restart. I couldn't figure out why.
I also could not find a way to NOT combine split horizon DNS with network interfaces (like most documents online only include scenarios like resolving corporate domain names using a VPN interface but that wasn't my case). I have multiple VPN connections to the same network (runs BGP basically) and I did not want the split DNS to bind to some specified interfaces.
Moreover, systemd-resolved seems not able to do split DNS without systemd-networkd. It needs systemd-networkd managed interfaces to do that. What? I just want separate DNS servers for separate domains. My WireGuard interfaces are managed by wg-quick. Correct me if it is possible to use systemd-resolved standalone in this case.
The hard systemd-resolved dependency of systemd-networkd also had issues. Sometimes, I just want systemd-networkd to configure resolv.conf using DHCP DNS but it looks like I HAD TO START systemd-resolved AND LINK /run/systemd/stub-resolv.conf to /etc/resolv.conf in order to achieve that (correct me if there's a way to not use resolved completely). Excuse me?
systemd-networkd itself was buggy, too. I once encountered https://github.com/systemd/systemd/issues/18108 and my friends reported they faced this issue as well. I don't mean that software should not have bugs but encounter them is really inconvenient.
In conclusion, I mean, systemd components seem to fit together and help you do a lot of things, but they did't do the things well, compared to separate programs for their specified tasks. Moreover, you have to deal with various components of systemd and figure out their relationships in order to achieve some specified tasks. For split DNS, I'm using dnsmasq now and it's working pretty well.
The declarative format of systemd unit files is just much easier to maintain, grasp and allows doing things that just cannot be done else, for example, a generic way to parallel starting service at boot, as all dependencies and before/after ordering is known.
And the great things is, that declarative format means that systemd can actually be replaced by something else, as one just needs to be able to parse the ini-style configs and execute the ExecStart and ExecPreStart in order.
One really cannot do that to the other init-systems, AFAICT, they are far too scripted and rely a lot on side effects to do anything like that, besides packager choosing different solutions for the same problem. Some KI-paper could possibly take a shot at parsing out some sensible information reusable for another tool ;-)
I can get the dissentient about systemd incorporating so much stuff, but just from POV of it as init-system it is really nicer to work with, speaking as user and as someone which job includes packaging software for a Debian based distro.
in system V init scripts on Linux they had standardized dependency declaration comments. when you added services you ran a dependency checker which would translate the dag into a total ordering, laid out using 01 02 03 ... numeric file name (symlink) prefixes.
it was robust, simple and straightforward.
however it was built around bash.
which was large and slow to start up,compared to e.g. dash as scripting shell. and dash was not widely around yet. so each script had the cost of bash startup, the milliseconds of which added up.
> in system V init scripts on Linux they had standardized dependency declaration comments. when you added services you ran a dependency checker which would translate the dag into a total ordering, laid out using 01 02 03 ... numeric file name (symlink) prefixes.
Yeah, I know, but in practice this did not really work out and was a mess. In fact, every update was scary to do, in that time I frequently just re-installed the distro on my private workstation, simpler than to deal with the rc stuff.
A plain setup may have worked, but anything slightly complex was just bonkers to do.
> it was robust, simple and straightforward.
Do you package for a relevant distro or is this just your experience as user? Asking because I just personally do not know any maintainers of software with a slightly complexer system interaction which would agree with that.
There surely are some, but FWICT on some ML's anti/pro systemd flames it's <1% of maintainers - and from them it's actually almost never the new unit file format what is the issue, but the way systemd eats up basic system services.
IMO the systemd unit files are exactly what you say "robust, simple and straightforward", the implementation may not be, I never even touched that, but the unit file schema is just better, as it's not bash/dash with some slight optional possibility to use some hacks like comments (urgh) as schema, but actually provides a standardized format for doing that and more.
As someone maintaining dozens of packages and as common user, I'm happy that I do not need to mess around and fight the init-system, and I'm not the only one thinking so[0].
I did package, for suse, yes. and I agree the declarative unit files are simpler to maintain.
the dependency comments were standardized, and the parser would give errors for incorrect comments.
and of course for the RC scripts, great powers came with great responsibility --- for the package maintainer.
I recently had to deal with the limited feature set of journald logrotation, compared to logrotate and syslogd. without going into the details, just compare the man pages, if you hit the limits of the available declarative feature set, you find yourself patching or doing fancy work arounds.
if the features that come with systems are sufficient, it's a happy switch. if some corner case is missing, good luck.
ps: I did not downvote. I don't do that for a healthy and interesting debate. that's not what we do on here, no?
The logging is amazing. Transparent compression, easy search, output in JSON if you want to parse logs, timestamps with microseconds if you need them.
No, writing stuff to a file was not fine. It's only fine if all you do is to 'tail' and 'grep' it, but any time you want to do something more advanced, it's a bloody mess.
Why parse a text date, when it started its life as an unix timestamp? Why write a bunch of regular expressions trying to get basic data such as an HTTP response code, when it could be a field in the log that you could just search for? Why deal with parsing while the log may rotate or truncate under you, when the log system could be making your life easier?
I wrote a whole bunch of log parsing stuff in my day, and so I have no nostalgia whatsoever regarding this "just write stuff to a file" approach.
Amazing for you maybe. If you have a slower spinning HDD journalctl -eu <service> takes 10-30 seconds (not an exaggeration). Meanwhile cat or tail -f of a log file is almost instant somehow.
> Why write a bunch of regular expressions trying to get basic data such as an HTTP response code, when it could be a field in the log
I mean, this is a problem which doesn't require systemd to solve, you just need a better log format. Someone could have standardised a line based logging format with fields and then someone else could have written libraries to write it and libraries to parse it.
> Why deal with parsing while the log may rotate or truncate under you
That's a log daemon problem that I haven't found to exist with any log daemon I have used.
> If you have a slower spinning HDD journalctl -eu <service> takes 10-30 seconds (not an exaggeration).
That's because you're asking for a log of a service since logging began, which may well have been months worth of logging. You're saying "give me everything that happened ever to this service in a pager, then scroll down to the bottom".
If you want tail -f, use a -f: 'journalctl -f -u <service>'. That's going to be a lot faster. You can also use '-b' to make it return a log of what happened since boot (worth looking into the manual for the details of that one), or specify a start date with -S, like '-S yesterday'.
> Someone could have standardised a line based logging format
And what were they waiting for? In the end, systemd did it, but it's a pretty recent invention. There was plenty time to get there first.
> That's a log daemon problem that I haven't found to exist with any log daemon I have used.
Because log daemons classically don't care about this at all -- it's a problem for whatever reads the files that the log daemon generates afterwards.
> That's because you're asking for a log of a service since logging began, which may well have been months worth of logging. You're saying "give me everything that happened ever to this service in a pager, then scroll down to the bottom".
journalctl -fu is just as slow. I don't keep months of logs and the amount of logs I do keep easily should fit within a minimal amount of space. Somehow systemd manages to screw this up completely and I really don't think this has anything to do with user error.
> And what were they waiting for? In the end, systemd did it, but it's a pretty recent invention. There was plenty time to get there first.
I don't know what people were waiting for. But I think what systemd did could have been done in a more transparent and decoupled fashion that didn't involve binary logs. Just because they did something right doesn't mean that the way they went about achieving it isn't inherently flawed. I get that logs suck but fixing that shouldn't require me to change my entire system management stack.
> Because log daemons classically don't care about this at all -- it's a problem for whatever reads the files that the log daemon generates afterwards.
The log daemon I use (svlogd) first closes the current file, renames it and then opens a new empty current file. If it finds that there's now too many old logfiles it deletes the oldest one. I don't see how this could possibly break any tool which is reading the file except for cutting the stream short when tailing during a rotation. Moreover I don't think that's a problem since if you need to do some kind of processing of the logs then you should just put that in front of or after the instance of svlogd in the pipeline (svlogd can be asked to forward logs to stderr which then means you can chain it with something else).
journalctl -fu takes over a second on my NAS with the logs on an SSD even.
I fucking hate systemd's logging so much due to this crap, don't make me read docs for every little thing, I just want to cat a damn log file, pipe it through grep and call it a day.
Haha, I wish. Then that file becomes too large.
So you want to truncate the start. However, removing bytes from the start of an open file is a bad idea.
So you open a new log file every day instead. You really want to compress the old log files too, to save space.
So now you can no longer just grep the logs as before. You're now also duplicating code and configuration for every daemon.
So you write a daemon called `logrotate` that does this centrally instead. Into which you then copy the log paths configured for every program on your system and how long the logs should get kept. However programs don't much like it when you move the log files out from under them.
So you patch every program respond to a signal by checking whether it's log files have been moved. Which then breaks for multi-process daemons.
You come up with a whole buffet of ugly hacks to make that work most of the time.
Then you install a program which doesn't come with a logrotate config.
Then you decide you'd really want a more structured way to analyze logs than writing fragile regexes.
Then you want to run something as a non-root user.
Then you have an ephermeral batch job.
Then you want to ship off all of your logs to another location and really don't want to duplicate the log paths yet again.
Then you want to see what happened just before the server crashed last boot.
Then you run two of a daemon and give them different log paths.
Then you want to look at your kernel and application logs together.
Then you want to delete just last month's logs to free up some space.
Also wouldn't it be handy if there was some kind of index to make things faster?
...
> However, removing bytes from the start of an open file is a bad idea.
A digression, but I keep wondering why filesystems never optimized this scenario. Being able to trim the start of the file is really useful in certain cases, and without support options are pretty bad.
It also seems fairly easy to support at the cost of a few bytes in the file entry (a start-of-data index into first sector), and resizing a file by seeking past end is already a thing.
I have never used svlogd but at it looks like it does read logs from it's stdin, which is a solid step forward as it avoids much of the pitfalls caused by applications writing directly into log files.
Collection is just the first part of a log system though of course.
Over the years I have historically had several production system outages due to journald corrupting its own data store, being unable to log, and services hanging due to being unable to log (process stdout buffer full, journald not reading it, so process stuck trying to write output).
It certainly has improved over the years, and it has been a long time since this issue has happened (on one of the systems I manage at least), but I have accrued some pretty deep seated feelings about it at this point due to historical pain.
It's just status quo. How would you feel about introducing having to log things into file after all you needed was stdout?
Btw, you still can do that nothing is stopping you, but I don't think each and every service needs to decide (and let user configure) where to put its logs, how to separate them (maybe by errors, maybe by users/domains) and how to rotate them.
I'm still not a big fan of systemd but it does make some things easier (but why wouldn't they think for a moment how easy "systemctl restoptart foo" will be to type, tab complete and issue different commands one after another)
The nice thing about docker is that you can use the same tooling on lots of operating systems, not just that it wraps some Linux functionality. Sure, it may involve using a VM, depending on the system, but I still get to just run "docker" and "docker-compose" and such, as if it were native. A systemd solution would need a VM running Linux w/ systemd even on Linux, in some cases.
Really, though, if I care about isolation and don't want to use docker, I'm gonna reach for FreeBSD + jails anyway, and I don't think systemd's gonna change that for me any time soon. If I want containers with better tooling outside the target OS, I'll use docker. Systemd falls in an awkward middle that I don't have much interest in.
> A systemd solution would need a VM running Linux w/ systemd even on Linux, in some cases.
But that's exactly what happens with docker anyway (e.g.: Docker is still running in the Linux VM when running it from a different operating system). And considering the widespread systemd adoption throughout the Linux ecosystem, it's far more likely for systemd to be already installed in the VM than docker anyway.
Systemd docker-replacement on a non-systemd Linux would need to run in a VM, though.
Systemd-docker-replacement: works only on systemd-Linux. Tooling for any other arrangement, including non-systemd linux, left as an exercise to the user.
Docker: works on Linux—systemd or otherwise. Has tooling to making working on macOS or Windows non-terrible and lets you use (mostly) the same commands as you would on Linux.
I'm saying that cross-platform tooling is what makes Docker Docker. Systemd can't replace it without replacing the tooling, even if it can do the same thing only on systemd-Linux.
> Systemd docker-replacement on a non-systemd Linux would need to run in a VM, though.
Would it? There's no reason this hypothetical systemd-docker-replacement couldn't be architected in a way that would not have a runtime dependency on systemd-the-init-system.
In any case, I'm not even sure if systemd wants to be a docker replacement (although it does seem to pick up more and more container features lately). But there's definitely some overlap between the two projects (in particular around process/service management) but podman is a much more direct competitor to docker than systemd.
Copying my reply from Lobste.rs because there’s more people here who can pick me apart:
_FD: I’m not a large supporter of SystemD after using it when it was first introduced in Fedora and watching it take over the ecosystem, I do use it and as a sysadmin/SRE type I’m heavily versed in it and how it functions, so, everything with a pinch of salt._
I gave the video a good shot, half the time is spent going over some systemd-ecosystem basics;
The author then makes the case that Alpine is a less attractive development/production-deployment platform due to lack of this ecosystem (though they make effort to avoid directly saying that systemd would be a good solution itself.)
I couldn’t disagree more honestly. I love the concept of Alpine: as small as possible and no smaller.
The attention to minimise dependencies makes it the distro of choice in containers; I’ve even considered (strongly) running it on some machines where systemd would have been a lot of needless complexity.
I think deviating from this path for alpine is a grave error, there will always be a place for a niche system that is small; especially when it’s commonly paired with some other log managment/service orchestrator like Alpine is.
Additionally, it gives people like me an option to run without init systems that could be considered heavy and intrusive with heavy dependency chains.
For something which the authors seem intent on forcing down everyone's throat whether they want it or not (genuinely you can find quotes of Lennart claiming he wants to make it more difficult to not use systemd or that he wants to "gently push" people towards it) it's not really surprising. If their only goal was to gain adoption based on the merits of their software while not intentionally making themselves intrusive nobody would really care.
> forcing down everyone's throat whether they want it or not
You're being highly offensive towards these developers for no good reason. All kinds of grand claims, just because things are done on a way that you don't agree with.
You've stated that systemd developers are wanting to force people to eat things. And their action is to actually force it into someone's mouth, likely requiring the person to be put into restraints to make this possible.
You're being highly offensive. Systemd has existed for loads of years, yet this accusation continuous to be repeated. Aren't you aware of German libel laws? If I'd accuse you of such behaviour, wouldn't you get upset? Why say such things, things that suggest criminal behaviour, so easily?
These things are repeated so often that it isn't even moderated upon. It's odd that this behaviour is tolerated.
Forcing something down everyone's throat is an hyperbole. They are not slandering systemd developers, nobody's suggesting people have to eat systemd. This is not offensive and it's not a crime, it's an opinion
> So, pretend that this somewhat realistic scenario is happening to you: it's 4:00 am you just got a panicked call from someone at your company that the website is down. You log into a server and you want to see if the website is actually down or if it's just dns. You probably want to know the answers to these basic questions
Those questions the page raises are based on what systemd tells you, not what I'd be askiny myself. I wouldn't want to know most of those, nor do they actually answer if "DNS is down" or not (what does it even mean).
From my computer: dig www.mysite.com -- checks DNS is available externally. Check it at a few sites (dig www.mysite.com @1.1, @8.8.8.8, @9.9.9.9 etc). My monitoring checks my website every 10 minutes anyway from multiple locations across the world and tells me if something is wrong, so it won't be that.
If I think the problem is that DNS lookups are failing on the server (so it can't see db1.mysite.com or whatever), something I might suspect if it takes a couple of seconds to log in as the reverse dns times out, I'd just log in and type
$ dig www.google.com -- checks DNS lookups are working internally
If it's not working, I'd check what's configured
$ cat /etc/resolv.conf
But oh dear, systemd has put its ugly fingers into DNS, and resolv.conf is pointing to 127.0.0.53, so I have to remember some convoluted command to run to try to find out what DNS it's using.
The easiest way in a systemd world to do that is
$ tcpdump -i any udp port 53 -nn
One of the many reasons systemd is so broken.
In systemd that's no longer the case, another daemon is running on my machine, another daemon to go wrong, another daemon to hide what's actually happening, another daemon to wake me up at 4am because it's not working.
I type systemd-resolve --status
and get 82 lines of nonsense (on my desktop), with perhaps 1 line perhaps telling my the 'current' server configured, and a few lines telling me other servers. But then there's different servers on different links, so it's all a bit of a guess, hence tcpdump is far more reliable to see where lookups are actually going.
I have a small monitoring PC which runs a bunch of VLC sessions and webpages. It broke a couple of months ago because of systemd hijacking DNS. That means spending time looking in to why it's broken, which is a waste of time, or just having a script to fix it on bootup. The script is an ugly hack, but systemd is draining. It gets in my way, I never asked for it, but practically every distro forces its use in various (and constantly changing) ways. That's why some people get pissed off by it, it doesn't just add features you can use, it fundamentally changes the core of your machine without even buying you dinner first.
Poetteringware seems to be highly praised by mostly young people who would like Linux to be a Windows clone. People who understands Unix concepts tends to dislike it.
I'm pushing 50 and have been using one kind of unix or another for nearly 30 years, so I like to think (a) I have a pretty good grasp on 'Unix concepts' and (b) if I'm a 'young people' why do my knees hurt so much.
As such, my opinion on systemd is the old ways weren't all that great and I'm glad the youth are trying to improve things.
DNS + NTP are completely optional, but you get really good integration with systemd-networkd's DHCP client if you use them. Switching network is completely seamless, and the resolver updates fully automatically (direct DNS and NTP are blocked in many networks, sadly). Also, you get something that works out of the box, with essentially 0 configuration. You can't even install a system today over the internet without setting the time, and systemd-timesyncd does it with 0 configuration.
Other than "sysvinit based init had horrific shell scripts with 100 lines of repeated nonsense", given that almost every alternative to systemd which still uses shell scripts needs around 2 lines of shell per service (including the shebang) what exactly is the issue with shell scripts (if all they do is run a wrapper which sets up the environment of a program or the program itself)?
> - no forking services
When I used archlinux these were extremely common and I used archlinux as recently as last year.
> - logging and service management is tightly coupled (this is arguably good with some bad parts, required CPU for logging with systemd is not great)
So runit handles spawning a log daemon before the service is started to ensure all log entries are kept and comes with a really simple yet extremely powerful log daemon (but obviously you can use almost anything else including cat if you want). It manages to integrate logging tightly into service supervision while being maximally flexible and decoupled. What do you think about this?
OK I bite. Nothing is wrong with shell scripts. However, I would like to know if something _wont_ work. Shell scripts do not have this feature. You know if something does not work when you run it. There might be external dependencies missing or other very typical problems. If we have a way to push all of these to "compile time" it is an improvement. I also spent many years in the land mines of implicit overrides in shell script hells and thank you but no. As a good example you can have how people try to set JVM parameters in a big data project using shell scripts. I it is absolute insanity. Same thing in init scripts. Did you implement reload or restart? Is stop actually doing something or a noop. And so on.
If there is only one thing that I could keep from systemd, it would be the use of unit files instead of shell scripts.
The rest is your observations, nothing to disagree or agree with.
> However, I would like to know if something _wont_ work. Shell scripts do not have this feature.
... Does systemd?
I still have endless problems with unreliable service startup and I've read all the documentation, have done all the debugging and asked all the people I could find.
> I also spent many years in the land mines of implicit overrides in shell script hells and thank you but no.
I'm not sure what you mean by this.
> Same thing in init scripts. Did you implement reload or restart? Is stop actually doing something or a noop.
So this is linux sysvinit style init scripts, OpenRC doesn't have this issue (as far as I can tell) and definitely I've never had to ask myself any of these questions when using daemontools or runit. Maybe you should familiarize yourself with how some modern non-linux-sysvinit inits work because they're certainly extremely functional, reliable and clear.
> If there is only one thing that I could keep from systemd, it would be the use of unit files instead of shell scripts.
I've actually considered this and I think it would be incredibly trivial to make a unit file parser which you can call from a shebang which would do this kind of thing. You could even have it fork off the parser to run it unprivileged. I think I'll try writing it sometime soon. You could even integrate all the namespacing, cgroups and lots of the other features systemd provides into it.
A few extra features, but you probably don't need them. I use svlogd because I use runit and I use runit because it happens to be supported by my distro.
The post was on 'the good parts' of systemd, so complaining about balance seems unfair.
I will call out one aspect that the author deemed a 'good part' as in my experience its a bad part: journald.
Usability: journald requires administrators to learn a new command to access their journals - everytime I have to use it I need to look up the syntax again. Compare with logs in /var/log and you can use all the standard unix tooling (text editors, tail, grep etc).
Reliability: in my use journald has made my servers more unreliable. Two CentOS 7 VMs, setup at the same time. On one journald works just fine, on the other approximately once a month journald would stop logging. It wouldn't start logging again until you noticed and rebooted the server. The real issue this exposes is that on a systemd machine, journald doesn't just log for itself, it also supplies the logs to syslog. So on this server when journald broke, there were no logs whatsoever.
This issue was apparently common on the version of systemd shipped with CentOS 7. The fix was to disable log compression in journald. What it highlighted to me was the inherent issues in an all encompassing system controller like systemd, in that if there is a bug somewhere in there you lose not only the added bells-and-whistles its intended to provide (journald in this case) but also the old previously reliable functionality (syslog).
In my mind the fix for this is a redesign of systemd to make it an optional layer on top of the reliable functionality rather than a low level system component that everything else needs to depend on. In the case of logs journald should consume logs from syslog, not provide them to syslog.
I don't mean to be disrespectful, but I don't quite see the resemblance. Could you elaborate?
As far as I can tell the only "windows-y" thing is binary logs and even then you got all the tools to get a plaintext stream to process.
Corruption of the logs can be a problem but it's nothing compared to...dunno, I assume people are drawing parallels to that and Windows' binary Registry, but then again I don't think I have had a Registry-related failure in decades. Besides, if anything, dconf is much more Windows than anything systemd could do, but I don't see anywhere as much vitriol for it.
I'm thoroughly confused about this small war with systemd. I missed all the early drama so I barely know what it's about, but in practice systemd has never failed me.
systemd is incredibly Linux centric. In fact it intentionally doesn't even try to be remotely portable, because an explicit design aim was to expose all the cool stuff that Linux has, but wasn't getting enough use.
These days I see it as a bonus. I don't want to mess around with the boot process. I don't want to write some sort of glue layer in between loosely coupled parts. And I certainly don't want somebody else to do it either, because that too often tends to result in some kind of surprise that one has to deal with at 3 AM.
What I want is a solid system that does what it's supposed to -- start stuff -- in a maximally boring fashion.
This is far from true, lmao. It's only tightly coupled to depending on the Linux kernel.
systemd was in fact heavily inspired by MacOS's launchd. At worst, it can be said that complex boot managers will begin to converge on a design that actually works ~ MacOS did, Windows did, and now Linux has with systemd. The three have plenty of differences, though systemd is still closer to launchd than not.
And in actuality, it's very tweakable. Did you notice that the source code is open, for a start...?
But the one thing that still really pisses me off about systemd-the-project was the fact that they ate udev-the-project. In my view, that decision was unnecessary and was done for purely anti-competitive reasons.
If you're not familiar, udev is basically the user-facing device manager for Linux. It's what allows you to easily configure rules and permissions for all the USB devices that you plug into your computer. These devices still need kernel drivers, but udev is how you tell your system "Please let user ohazi use this device, and also give it a convenient name like /dev/someDevice0"
By devouring the udev project, the systemd maintainers have guaranteed that dealing with USB devices on non-systemd systems was going to be a giant pain.
Then came the forks -- Gentoo maintains eudev, which is a systemd-free fork of udev. But really, this shouldn't be a fork. Udev should be independent and available on all systems. If systemd wants to do something special with devices, they should use udev APIs like everybody else. In my view, this is what finally allowed systemd to win the init war, despite all the protest. Ideological arguments about how best to start daemons is one thing, but you simply can't use a modern system without a sane approach to USB.
Edit: It seems that some of my concerns were overblown, e.g. you apparently can run udev without systemd as pid 1. Udev has a build-time dependency on systemd, but not a run-time dependency. The eudev fork removes that build-time dependency, and (maybe?) also papers over some other inconsistencies. I'm pleased that this is the case. I'm annoyed that the discourse around systemd/udev has been muddy enough to lead me to incorrect conclusions (and I'm aware that the original version of this comment likely added fuel to this particular fire). Oh well... live and learn.