Live data from Hacker News

Systemd, ten years later: a historical and technical retrospective

blog.darknedgy.net

431–440 of 458 posts

Re: Systemd, ten years later: a historical and technical retrospective

#431
post #419
post #412

Earlier quoted context omitted.

Please read the article before commenting. > Indeed, one ought to observe that the most important consumers of an init system are not sysadmins and ops people as commonly believed, but rather distro maintainers. It is their laziness that determines the balance.

I had. :( Users choose their distribution, ultimately. I don’t agree with the author’s conclusion there.

That's an oversimplification.

The article goes into detail about why there was a desire from some distro maintainers to switch to something else. (clean slate).

The reason I accused you of not reading the article is because it's very clear why systemd was adopted.

1) RH Made it, that doesn't automatically make it good, but there was a lot of posturing from the RH devs to get more things tied in to it under the guise of "all distros will use us eventually, they're already in the process of adopting us!"

2) There was a strong desire to get off of sysvinit, many alternatives had come and gone, though most had the desire to be backwards compatible, none could get any real traction, mostly because it was hacks on hacks. Upstart was promising but people didn't use it properly.

3) GNOME added a hard dependency. Small in isolation but then.

4) UDEV was made systemd-only. UDEV being something that underpins a lot of software. A fork was made (eudev) but that was only the beginning because krdb was next to be systemd only.

5) when it came time for Debian to talk about systemd as the last major upstream distribution (IE: one that sysadmins actually deploy and one that other distros are essentially variants of): it was not "systemd or alternatives" it was "how much systemd do we have to take to be able to support most software."

6) When your distro can't take a major desktop environment, that's a lot of points off of your distro.

--

People choose their distro, but their distro often chooses a distro.

If you're a business building your company, you don't trust Gentoo- you run it on RHEL, Debian or potentially Ubuntu these days.

Re: Systemd, ten years later: a historical and technical retrospective

#432
post #414

Earlier quoted context omitted.

Learning new tricks gets harder when we get older. Is that the software’s fault?

You could make several arguments here, but they're all small until you aggregate them. 1) Breaking working systems should be dissuaded, especially when it comes to human interaction. There's a reason that Microsoft still has a start menu and "File/Edit" menu's 2) There is a certain level of arrogance to the notion that a developer of core infrastructure for literally millions of users can just change things and expec…

Yeah, you’re right. I was exaggerating for some reason I don’t recall anymore, a bad day perhaps, too much or too little coffee or something. Who knows.

Of course I don’t discriminate at hiring time against people who disagree with me on such a trivial technical detail. Or hunt for them so I can maintain secret lists of undesirables. That would be unethical, probably illegal, and definitely stupid.

Re: Systemd, ten years later: a historical and technical retrospective

#433

I don't fully understand systemd, but the technical critique looks interesting and seems to indicate systemd is poorly designed (but I don't understand it all). Anyone else commenting on that?

Enjoy https://blog.darknedgy.net/technology/2015/10/11/0/ , by the same author.

Re: Systemd, ten years later: a historical and technical retrospective

#434

I do really appreciate this type of long form, researched blog post. I have no strong opinions on systemd, I've made simple service units and it has worked well enough. Having the history behind the design is a great aid to understanding.

Then you will probably enjoy these:

* https://blog.darknedgy.net/technology/2015/10/11/0/

* https://blog.darknedgy.net/technology/2015/09/05/0/

* https://blog.darknedgy.net/technology/2016/01/01/0/

* https://blog.afoolishmanifesto.com/tags/supervisors/

Re: Systemd, ten years later: a historical and technical retrospective

#435
post #391

Earlier quoted context omitted.

>I've already been in a forest of bash scripts and I would not go back there again. I have no comment on systemd's implementation but the implementation you're talking about is also incorrect. In certain cases I don't disagree, but systemd does not implement this feature correctly, so using functionality that's easily reviewable from decades past makes sense. If systemd could properly implement the feature, there wou…

If you really want systemd to add this then I'm sure they will look at your feature request or PR. I would urge you to actually check with your system instead of blindly dismissing me as wrong just because your bash script happened to work without error. In my experience BSD-based Unixes get it right and don't use procfs for ps or pkill. They don't have the problem because they use special syscalls for this. But SysV…

>If you really want systemd to add this then I'm sure they will look at your feature request or PR.

The less systems touches the better.

>I would urge you to actually check with your system instead of blindly dismissing me as wrong just because your bash script happened to work without error.

Who said this was bash? The script from all those years ago worked perfectly without race conditions.

>They don't have the problem because they use special syscalls for this. But SysV-based systems have historically used procfs to implement ps.

Makes no difference, procfs works fine for this.

>Try unmounting proc and running ps or kill and see what happens.

You're effectively never unmounting procfs. Also, if you managed to, systemd would crash!

>If you can't do it then your system suffers from the problem, which is that you can't safely send a signal to the process after reading it because there is no guarantee that the actual PID will persist in between calls to read() and kill().

There's maybe 10 lines of code to ensure that logic. Again, middling sysadmin work.

>POSIX says nothing about this because it doesn't specify procfs, or how pkill should actually be implemented. This is all fair game as far as compatibility is concerned.

POSIX does say something about this; read about signals. You stop the process before killing it, and ensure that the start time is the same for the stopped process before the kill. That completely eliminates the race condition, using basic POSIX signals.

>There is also the other more obvious race condition in your bash script which can also be pre-empted in between the calls to ps and kill.

That race condition is eliminated with the logic above. That eliminates the PID reuse race condition, even if it's very rare.

>reuse has been a known problem for decades and Linux finally got a solution to it a couple years ago with pidfd_send_signal.

That functionality is where it belongs now, so instead of coding a logic every time you have to ensure PIDs, it's now handled for you.

>There is also the matter of cgroups but I am not going to get into that because I doubt you will want to hear about it.

Correct, I don't want to hear it from someone who doesn't understand POSIX and basic/intermediate sysadmin work.

Re: Systemd, ten years later: a historical and technical retrospective

#436
post #379

Earlier quoted context omitted.

The functionality to gracefully end long running background processes has been a part of standard killall, pkill, etc. for quite some time. Even then, yes, the functionality of using ps and kill together has existed for 20+ years. Those tools are already implemented, providing the functionality for decades. In no universe is logind considered robust, and basic scripts from middling UNIX admins have provided this func…

See my comment below. These tools are fundamentally broken for this use case and have never provided the functionality needed. Bash scripts are not a process manager and it is incredibly wrong to try and make it work like one.

I responded to the comments below. These tools are not fundamentally broken, you're just ignorant in this space. They have always provided the functionality needed. Scripting can easily manage processes at a higher level, and it's basic functionality to make it work like that.

Re: Systemd, ten years later: a historical and technical retrospective

#437
post #130

Earlier quoted context omitted.

There is no competitor because there was no problem. For most of use cases SysV, rc.d worked. Just like ifconfig. Arch Linux switched to systemd earlier than Debian. And I have not noticed. Arch community accepts breaking changes. Debian? I believe they value stability. Systemd should have matured, proved its citizenship and qualities. And it would have been accepted. Instead it usurped. People had no choice but to a…

Usurped how? Who and how forced Debian and Arch to switch to systemd?

You're missing a point. It's about feelings. Not my feelings at all. But empathy.

Replacement for "no problem" should run without problems.

python2 had no problems - there was a clear transition path:

    1. "str" => b"str"
    2. wait some time
    3. "str" is u"str"
ALSA had no problems - just wait till PulseAudio is ready.

SysV, rc.d had no problems - just wait till systmed is ready.

If SysV was as bad there would be same amount of outcry as with systmed

Was it really necessary to make it painful?

Who? Somehow systemd defenders has no empathy and Lennart Poettering is a prime example. No matter right them or wrong they are perceived as threat.

Just be nice. It may hinder innovation but it helps community.

Re: Systemd, ten years later: a historical and technical retrospective

#438
post #116
post #108

Earlier quoted context omitted.

> Are user processes allowed to run after logout? Which DNS to use during startup? What logging in should look like? In each such case, existing behavior which was widely considered as not broken was replaced by a different behavior, often even without an escape hatch. The new behavior(s) in such cases should be made possible, but the default should be the old behavior. All those examples you gave are possible to dis…

Good thing sanity prevails in distro maintainers! But not in upstream, as you duly note. I also remember that even 2-3 years ago the situation was not as nice yet. I think what became systemd could have been great software, if not for the, mmm, cavalier attitude of its creators (not necessarily personal; it might be amended by RH corporate deadlines).

The fact that `KillUserProcess` is default to on is not something that systemd forces to your distro, there is even a flag to disable it at build time. It does makes sense in many situations (like IoT, embedded, etc.), that is why it is on, but distro mantainers also needs to know what is better for its users (that anyway is a really small part of Linux users, embedded is much bigger).

Re: Systemd, ten years later: a historical and technical retrospective

#439
post #108

Earlier quoted context omitted.

> Are user processes allowed to run after logout? Which DNS to use during startup? What logging in should look like? In each such case, existing behavior which was widely considered as not broken was replaced by a different behavior, often even without an escape hatch. The new behavior(s) in such cases should be made possible, but the default should be the old behavior. All those examples you gave are possible to dis…

resolved has been enabled in Ubuntu for years and in the next Fedora.

This is a decision of your distro mantainers, they could also default to unbound, dnsmasq, bind, or anything else. They use systemd-resolved because it probably solves some problem for them, even if this problem is reduced burden of maintenance.

Re: Systemd, ten years later: a historical and technical retrospective

#440

Earlier quoted context omitted.

homed is a purely optional, independent tool, for use in situations where you’d use roaming home directories on windows, or similar technology. No one is forcing you to change your broken buggy 30-year old shell scripts, you can always continue using them.

> No one is forcing you to change your broken buggy 30-year old shell scripts, you can always continue using them. How about usernames that start with a digit? Am I still allowed to use those? * https://ma.ttias.be/giving-perspective-systemds-usernames-st...

POSIX says that any tool should always translate usernames into userids at the earliest possible point, and pass UIDs to children it spawns.

Now assuming I have a user called 1000 with UID 2000, and a user called 2000 with UID 1000.

Now what do you think is gonna happen if multiple POSIX-compliant tools call each other?

This is clearly broken, and the reason why BSDs don’t actually implement POSIX cleanly, instead allowing all their tools to take unambiguous identifiers on the CLI, with the # prefix to mark a UID, and have all their tools call all their children with this format.

The POSIX standard is clearly suboptimal here, and the set of valid usernames, and the set of valid UIDs should never have been allowed to overlap.

Post reply on HN