← Back to context

Comment by graemep

2 days ago

This is why i dislike systemd. Things not working the way I expect means I have to do more work to figure something out.

In my experience, systemd is much better documented, way more consistent, and way more reliable than what came before.

  • I guess it depends on your source of info but I've found what came before was pretty comprehensively & accessibly documented, at least as well as systemd, which - while well documented - suffers from sprawl & overwhelm of the docs. There's just SO MUCH to grok in comparison.

    • I never found systemd difficult, but I do find prior solutions to be simpler. An init script is easy, and the order is also easy. If people are accustomed to UNIX systems, the sysvinit is better. For people who never experienced those systems, systemd is their friend. No need to use UNIX tools when Systemd ships with batteries included.

      7 replies →

    • No way. I was easily able to create Systemd units from 0-knowledge, where the init system remains a big black box riddled with question marks for a very long time. Very little was documented.

    • Absolutely not the case. Even relatively simple real world uses involved collections of shell scripts to carefully mount or initialize services in just the right order and would often fail with weird and infrequent timing glitches. With systemd that all becomes explicit, so of course it is awkwardly verbose. That is the whole point and a huge upgrade.

      3 replies →

    • We can argue about which has better docs, but, to me, systems offers a uniformity of practices and a consistency of service offerings that was never the case before.

      Ever company used to have to make its own decisions about what logging solution to use. Each one had its own configuration paradigms! Every single daemon had some kind of bespoke /etc/init.d/ script that had its own rules and practices, having either forked off some other skeleton or having been made on it's own at some point.

      And then companies wanted to do the right thing and apply some capabilities restrictions to processes. They wanted a little more than out of box security. That results in every company forming and modifying init scripts, changing the configuration paradigms, encoding config directly in or inventing their own new parameterization.

      The fact is I don't have to look at docs any more, because everything has a (pleasant) uniformity. The fact is we are worlds better at securing and locking down our processes, because systemd has incredible built in options for capability, sandboxing, and other fantastic security processes.

      > There's just SO MUCH to grok in comparison.

      There always was before too. Most people skated along the surface, but when some daemon tried to actually have better practices, do some security tightening, operators were in for that exciting rabbit hole of trying to catch up and learn. Or just hand wave it away.

      I think this statement really iconifies the systemd resistance really. Yes there is so much (imo: enjoy it, isn't that so great?) It's many many many latent possibilities (for you to over time learn): it's so often what the kernel is offering you, it's well exposed, and you have a pleasant uniform system for harnessing that, that you only have to learn once and which can pay dividends again and again and again once you learn it. Learn once, use many.

      Or just ask your LLM. It knows. It will just tell you. It won't have to read docs or source. It knows systemd very well. Because it is something shared, something known. Imo it ought be something treasured.

      I'm fine if some day we get rid of systemd. Nothing sacred here. But to attack it, it must be attacked from above. It must be replaced by something with more principled and more capabilities. Same as Kube. Neither is going away, neither will ever be displaced by smaller offerings. The only way out is through, the only way out is up. Godspeed, good luck, have fun.

      8 replies →

  • Maybe, but the scale of systemd features is humongous. It better be well documented. You don't need a user manual for hammer, you do need one for hydraulic press.

    • The scale is humongous? Syszemd is not one big thing. It's a collection of small things, each meticoulsouy documented and you can pick and choose.

      If you still think there is only one Systemd, maybe learn about the tool instead of just talking others after their mouth.

      8 replies →

  • I'm still using sysvinit without anything on top (the default would have been sysvinit + openrc, but I dropped openrc, too complicated for my needs). I find it a lot easier than learning systemd, or learning anything else. To find out what's going on, I just need to open one file: /etc/inittab, and it's all in there. Nothing hidden somewhere else. Nothing undocumented. Simple commands, one after another. There are no dependencies, no conditions, not unless I put them there myself.

  • So, I disagree about your statement here, but let's for a moment assume it were correct - so let's not evaluate THAT particular statement, thus.

    You most likely refer to sysinit or something like that, right? Because to what else do you compare it to? Shell scripts?

    Shell scripts in general are crap. I don't understand why linux systems use them. When I transitioned to linux a long time ago, I wrote - and still write - pretty much all logic in ruby and .yml files. Literally my whole system is described via .yml files, ruby then just auto-expands all of this into what is meaningful. I also compile from source and manage the system via ruby as-is, so I don't even need systemd, nor shell scripts. But this is just one comment here and if you refer to shell scripts then I agree with you - shell scripts have always been horrible. I fail to see why we should like systemd merely because shell scripts are so awful. That makes no sense. I neither use systemd nor shell scripts (ok ok I bail ... I am currently using manjaro which uses systemd; I disabled most of the services, but the primary reason I was assimilated into systemd is mostly because the non-systemd linux distributions, kind of gave up for the most part or come with their own set of problems - slackware, void and so forth. And yeah, I was using and testing them for ages too, slackware I used for many, many years. It is still a great distribution but it is not really active anymore. No new .iso releases in years, sorry, that is dead. Even if Patrick still updates packages.)

    The other part is ... IF you referred to an alternative init system, then THAT comparison is flawed too, because sysvinit is mostly just an init system. Systemd is some giant thing that does 100000 things. So the comparison is, and ALWAYS has been, unfair. Not the same things are compared here.

    • Systemd is not 1 giant thing that does 100000 things - it is a collection or 10000 services doing 10000 things, integrating amongst themselves where practical. You need not use networkd, logind, resolved or any other one piece of the system you dislike.

      1 reply →

    • > You most likely refer to sysinit or something like that, right? Because to what else do you compare it to? Shell scripts?

      dinit is a good service manager that doesn't feel obligated to reinvent the kitchen sink

  • Well, in my experience, systemd has much worse documentation, is very inconsistent (or you could say it is constistantly brain-dead), and extremely unreliable and unpredictable, since it often hangs when shutting down and rebooting.

    • In my experience hangs usually happen from no time limits on units or excessively long time limits. I fried a NIC a while back and network-manager-wait-online has no time limit. Usually this isn't a problem, but the NIC was fried in a very unique way where it would continuously try to connect and then downgrade connections.

      The bright side is this is all logged, trivially grep-able, and easy to fix.

    • systemd is like the registry. If you drink the koolaid and fully admit and adopt the decisions made, you’ll do ok, perhaps even good.

      If you have 20+ years of experience, you’ll will NEVER get it to work the way you expect, might as well install Gentoo.

> Things not working the way I expect means I have to do more work to figure something out.

I dunno, "things not working the way I expect" is very subjective.

I personally think it makes more sense that processes do not outlive the parent from which they come (in this case processes spawned from a user shouldn't outlive that user) unless you explicitly go through something which outlive the parent (process manager in this case (e.g. running via systemd-run)).

Though I am also strongly of the opinion of just because something is a feature, does not mean it is good to keep around, e.g SUID/SGID (which has a similar "I get more than the parent" problem).

Though I guess different people can have different opinions/values on this.

It's one of those systemd features that are annoying and in the way when you're trying to accomplish a specific task but deal well with shitware. To be fair to systemd, these features can't usually be implemented without writing new rules for what you have to do to accomplish the legitimate tasks.

> This is why i dislike systemd. Things not working the way I expect means I have to do more work to figure something out.

Even if the change is a genuine improvement?

  • Yes. Improvement or not, a thing not working the way one expects means one has to do more work to figure something out. And in case of pid1, this is never a time spent productively.

    I'm all for improvements and I love updates of software, but what systemd usually does is ideology and destruction in the name of "new". Like, we have had cron perfectly working for _decades_ until one man told us we were all wrong on that.

  • How can the change be a genuine improvement, if it does something unexpected that needs to be figured out?

  • This is not a genuine improvement:

    > One of the features of systemd that is most controversial is the option to kill user processes when the user logs out. That initially killed screen/tmux/nohup processes too.

    Killing processes that the user clearly did not want killed is a regression.

    Reading the rest of article it seems that its fixed but made things a lot more complicated than "unless you deliberately start things so that they keep running when you logout they will be killed when you logout". Am I wrong?

    • I don't think it's a regression at all. It's been standard advice for decades that logout-login wipes user processes for updates, therefore you don't need to restart.

      I'd argue the opposite is true: linger is surprising, and I turn it off.

      1 reply →

"The way you expect" is probably inconsistent and, upon closer inspection, completely broken.

There is a reason why systemd became the default and other niche init systems have faded into obscurity.

Sure, it may be more complex than your pile of shell scripts, but that's because it does the same things better, and has a lot more functionality that you will need at some point, and good luck replicating that by hacking shell scripts.

  • > "The way you expect" is probably inconsistent and, upon closer inspection, completely broken.

    When I start a program, I want it to stay running. This is perfectly consistent and not broken.

  • You are framing this as the only choice being between systemd and shell scripts.

  • > There is a reason why systemd became the default and other niche init systems have faded into obscurity.

    Yes, it is part of the Embrace, Extend, Extinguish strategy

I, for one, appreciate the honesty. I wish more systemd haters would admit this is why they dislike it. We could finally throw away the tired arguments that have been disproven in the past ten years

  • > We could finally throw away the tired arguments that have been disproven in the past ten years ...

    Here's one you cannot disprove: the Jian Tan XZ backdoor did not affect Linux distro that weren't using systemd.

    I know, I know, it's got absolutely nothing to do with systemd.

    We're talking about something insane like upstream OpenSSH being modified to add systemd logs "log compression" to freaking OpenSSH (yay security, makes perfect sense!).

    So disprove this: not a single Linux systemd-less distro was affected by an attempt to place a worldwide backdoor on Linux systems exposing a SSH port.

    P.S: I moved all my infra to VMs that are systemd-free and containers, by default, do not run systemd as PID 1 (they don't run it at all). It works flawlessly. I'll now move my hypervisors to FreeBSD+bhyve and I'll be, at long last, totally systemd-free again (I was using Linux before "systemd-I-compress-logs-so-I-make-you-modify-OpenSSH-to-add-liblzma-dependency" came on the scene with it's its Windows-style .INI files and these were much better days).

> Things not working the way I expect means I have to do more work to figure something out.

You must love SELinux

The fault lies in the distribution for it's default configuration, not systemd.

The article even mentions that distros ship with it turned off