this post was submitted on 07 Mar 2024
485 points (96.5% liked)

linuxmemes

20761 readers
1459 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 6 months ago

honestly though

[–] [email protected] 26 points 6 months ago* (last edited 6 months ago) (1 children)

Kind of sad there are still people raging over systemd. When it flares up in discussions there is the usual debunked nonsense:

  • it only logs information to binary and this is somehow bad. Except it it can be configured to log to text as well and it uses binary so it can forward secure sign records to prevent tampering as well as offering database style query operations.
  • it's insecure because the repo has millions of lines of code. Except that they compile into hundreds of small binaries running with least privilege, and often replacing the task of far more dangerous processes (e.g. there is an NTP client in systemd which sets the time and nothing else).
  • various rants about the primary author

What is more bizarre is the nostalgia and hearkening back to sysvinit scripts when systemd didn't replace sysvinit! Systemd replaced upstart which replaced sysvinit. Because writing 100s of lines of script to stop/start/restart a process sucked - insecure, slow, didn't scale, didn't capture dependencies and everyone knew it. Upstart was the first attempt to solve the issue and was used in Debian / Ubuntu, Fedora / Red Hat, openSUSE and others until systemd came along.

[–] [email protected] -1 points 6 months ago (2 children)

Not really involved with Linux for the past 15 years so don't know the ins and outs of the systemd saga butyour debunking is not as convincing as you make it sound. I do run a system at home that when all goes well I don't need to login to or do troubleshootingfor months. (Ie. Movies and shows download fine, homeassistant works). I stumbled upon systemd a while ago when I had to google how to fucking find and look at some logs on my Ubuntu system. Wtf have been a sysadmin professionally for years until a decade ago. Never seen something changing like that, but I digress as for your points.

Being able to query logs like a database sounds appealing dont take me wrong. But If I am interested I will install splunk, graylog or whatever kids use these days, I don't need a core component to make a major structural change (logging on Unix is expected to be in plain text, most tools on a Unix systems do some sort of manipulation of log files, and i expect to use cat, grep and tail to work on my logs). The fact that I can opt out is a minor consolation. Also if I want my logs not to be tampered with, I'll look into how to do that with dedicated tools and technology. On most systems that's not a concern, why would you even consider that something appealing?

As for sysvinit scripts pain, I hear you buy a) I am pretty sure most script I have written/modified were tens of lines of code, not hundreds, hardly an impossible task to deal with. And b) that's not something your average user needs to do every day (or decade). Most likely a sysvinit script would be implemented once in the lifetime of a particular project by the developer themselves, or by a package maintainer. If the solution to such a big problem is to have millions of lines of compiled code (that's news to me, I'll trust you on that number) it makes me wonder even more.

Are you sure all the counterarguments are really just bizarre nostalgia and easily debunked? I haven't even read much about it and even when people like you try to sell how good systemd is, it looks to me like the solution we didn't ask for a problem we didn't have.

[–] [email protected] 3 points 6 months ago

As somebody who started my *nix journey on Unix System V, the OS that sysvinit came from, I think the grandparents comment is spot on.

Also, upstart could have been good, but it's actually pretty great to see the majority of the ecosystem adopt a single new solution. We wouldn't want the init landscape to be like the X vs Wayland and WM landscape.

[–] [email protected] 5 points 6 months ago* (last edited 6 months ago)

Concerning logs:

  1. You can still log to text if you want by configuration (e.g. forward stuff to syslog) and you can use any tools you like to read those files you want. So if you like text logs you can get them. You can even invoke journalctl to output logs on an ad hoc / scheduled basis in a variety of text formats and delimited fields.
  2. Binary allows structured logging (i.e. each log message is comprised of fields in a record), indexing and searching options that makes searches & queries faster. Just like in a database. e.g. if you want to search by date range, or a particular user then it's easy and fast.
  3. Binary also allows the log to be signed & immutable to prevent tampering, allow auditing, intrusion detection etc.. e.g. if someone broke into a system they could not delete records without it being obvious.
  4. You can also use splunk with systemd.

So people object to systemd writing binary logs and yet they can get text, or throw it into splunk or do whatever they like. The purpose of the binary is make security, auditing and forensics better than it is for text.

As for scripts, the point I'm making is systemd didn't supplant sysvinit, it supplanted upstart. Upstart recognized that writing massive scripts to start/stop/restart a process was stupid and chose an event driven model for running stuff in a more declarative way. Basically upstart used a job system that was triggered by an event, e.g. the runlevel changes, so execute a job that might be to kick off a process. Systemd chose a dependency based model for starting stuff. It seems like dists preferred the latter and moved over to it. Solaris has smf which serves a similar purpose as systemd.

So systemd is declarative - you describe a unit in a .service file - the process to start, the user id to run it with, what other units it depends on etc. and allow the system to figure out how to launch it and take care of other issues. It means stuff happens in the right order and in parallel if it can be. It's fairly simple to write a unit file as opposed to a script. But if you needed to invoke a script you could do that too - write a unit file that invokes the script. You could even take a pre-existing init script and write a .service file that kicks it off.

[–] [email protected] 12 points 6 months ago (1 children)

Me who doesn't know what it is and just uses it because it came with my distro

[–] [email protected] 9 points 6 months ago

Yeah. It was a controversy like 10 years ago at this point.

[–] [email protected] 28 points 6 months ago (2 children)

I feel like the people who complain about systemd have never tried to mess with sysVinit scripts before

6+ years ago, I was trying to configure a touchscreen HAT for a raspberry pi, and dicking with the init.rc script was a massive pain

[–] [email protected] 4 points 6 months ago (2 children)

The alternatives to systemd isn't init.d or some other legacy init systems. I use runit, pretty easy to understand and use. Stop being lazy dude

[–] [email protected] 3 points 6 months ago

Or dinit. dinit is awesome. s6 defeated me; an init system shouldn't be that complex.

systemd has a lot of nice features, esp. in the area of dependencies and triggers. But it infects everything it touches, is enormous, and is buggy.

Frankly, I'm waiting for the PipeWire successor to systemd. Like systemd, Pulseaudio was everywhere by the time enough people realized how bad it really was and someone wrote a well-designed, well-written replacement. ALSA has problems that Pulseaudio fixed, but with a badly written solution; then a good software developer came up with a good solution that solves the same problems but isn't just a giant hacky hot mess and now PA is slowly being replaced everywhere. Given that the same person, of questionable skill, who wrote PA also wrote systemd, I fully expect a better-designed solution to replace systemd.

S6 isn't it. dinit is close, but has some holes that need addressing before it could succeed systemd, and I think it won't be it; I think systemd's successor hasn't been written yet, but I have confidence it will be.

[–] [email protected] 1 points 6 months ago

+1 to runit. So much simpler than systemd unit files.

[–] [email protected] -2 points 6 months ago (2 children)

anyone ever seen a goldwing? it was supposed to be a motorcycle but for some reason has a fridge, microwave and what not added.

it is still a motorcycle. you can ride it. it starts right away and has all sorts of extra functions.

and now look at it. it is an ugly piece of engineering that only the weirdest of people like.

dont ride a goldwing. dont use systemd.

[–] [email protected] 3 points 6 months ago (1 children)

What are you talking about? The goldwing has been consistently hailed as one of the best touring motorcycle for almost 40 years. Every long distance rider I've spoken to says the goldwing is their favorite bike for cross country rides, and the ones who have sold theirs for a BMW or Harley touring bike have expressed regrets about changing.

Just because something has a lot of features, doesn't mean it's bad.

[–] [email protected] 2 points 6 months ago (1 children)

where i live ppl laugh about goldwing riders. it is considered the idiots bike: https://avida.cs.wright.edu/personal/wischgol/fsr/Guenther/Goldwing.html

..just one example.

google suggest in my country autocompletes goldwing with "mikrowelle" (microwave).

maybe we just have a different taste.

[–] [email protected] 2 points 6 months ago

That was a pretty funny read!

I'm guessing this could be a common use case difference? Maybe touring in smaller stints makes the goldwing seem like way too much overkill, but if I were to do a bike trip across the US, I'd much prefer riding on a goldwing vs a smaller and more "functional" bike. Several thousand miles can be a real killer without all those comfy bells and whistles.

[–] [email protected] 3 points 6 months ago (1 children)

No clue about motorcycles but those things look neat and win awards. I want one now. Thanks for turning me on to this neat bike.

[–] [email protected] 3 points 6 months ago (1 children)

yeah sure. enjoy that and some systemd. everyone likes different things.

[–] [email protected] 1 points 6 months ago

Oh okay, you said not to so I thought you meant don't. Thanks for being cool with what I'm in to

load more comments
view more: next ›