News for hackers. Stuff that matters.
Re:Everything that uses configuration files should report wh... by wpietri on Sunday June 25, 2023 @12:55PM (#36470236)
> If you find it hilarious it's because you don't understand the reason.

I think it's hilarious that you think users are supposed to understand "the reason" at this level of detail.

When we make a thing, we make choices about who it's for. Sometimes those choices are explicit. But this is a good example of an implicit choice. Clearly it grew into this shape for reasons, but those reasons are about the people doing the making, not the people using it.

Even if we grant that all of this hierarchy is necessary, it still imposes a large burden on the person trying to figure out "why is X doing Y?" And that might be fine if the makers said, "Well this is going to be hard, so what can we do to make it easy?"

But denying that users will reasonably find this hilarious (or frustrating or impossible) is just digging the hole deeper. Telling people that their understandable reactions are wrong doesn't change their reactions, it just gets them to stop mentioning the problems around you.

Re:Everything that uses configuration files should report wh... by thayne on Sunday June 25, 2023 @01:36PM (#36470735)
> it still imposes a large burden on the person trying to figure out "why is X doing Y?"

Systemd has tools for that, such as systemctl cat which shows all applicable configuration and what files they come from.

Personally I have found the systemd hierarchy to be very useful. It allows me to create overrides for certain properties in a Unit without having to worry about keeping the rest in sync with upstream, or my package manager overwriting my configuration. And it allows me to have different independent packages (or chef recipes or ansible playbooks) that create different override files for the same unit without stepping on each others toes.

Yes it is a little complicated, but for most end users, you don't really need to worry about most of the complexity, you just need to know where you put your overrides. And for distributors and power users, that complexity serves a useful purpose.

Re:Everything that uses configuration files should report wh... by wpietri on Sunday June 25, 2023 @01:49PM (#36470860)
> Systemd has tools for that, such as systemctl cat which shows all applicable configuration and what files they come from.

Sure, it could be that systemd does have amazing tooling for helping users with the burdens they have created. Or, given the very mixed feelings about systemd, maybe they've tried to be user focused but not hit the mark. I don't know enough to say.

But my point is that either way responses of the form "it's so easy, you just have to remember [9 paragraphs of detail users don't care about]" are part of the problem, not the solution.

Re:Everything that uses configuration files should report wh... by darkwater on Sunday June 25, 2023 @02:34PM (#36471263)
"Make it as easy as possible, but not simpler". I think this applies perfectly here. Systemd has very complicated requirements due to its very unique position in a Linux distribution. And as a (power) end-user of it, you basically need you basically needs to touch only /etc
Re:Everything that uses configuration files should report wh... by danaris on Sunday June 25, 2023 @06:55PM (#36473507)
> Systemd has very complicated requirements due to its very unique position in a Linux distribution.

But are all those requirements actually necessary for the job it's doing? Or have its developers imposed artificial constraints through their choices in designing systemd that make it more complex than it could otherwise be?

Re:Everything that uses configuration files should report wh... by jen20 on Sunday June 25, 2023 @10:59PM (#36475237)
The combination of distributions existing and believing they “own” parts of the system, and users needing to override settings means it is as simple as possible, and no simpler.
Re:Everything that uses configuration files should report wh... by TheNewsIsHere on Monday June 26, 2023 @02:08AM (#36476272)
Put more generically, I think we could add: “unless you build it all yourself, you’re going to have to work with other peoples decisions.”
Re:Everything that uses configuration files should report wh... by rocqua on Monday June 26, 2023 @03:27AM (#36476756)
A distribution 'owning' a directory means that the package manager is allowed to change files in there, and allowed to assume nothing major was changed from what it installed.

A distribution that doesn't own any directories like this effectively can't make any changes. It's like writing a class without private fields.

Re:Everything that uses configuration files should report wh... by ibrahima on Sunday June 25, 2023 @02:48PM (#36471380)
Systemd didn't create this problem. But it solves the issue of distributions shipping config files as part of packages and then on every package upgrade having to reconcile between the distribution's config and your modifications. Now with the drop in system you don't need to do that.

I am not an expert but I think in general systemd has a lot of complexity but it's to handle existing issues in a better way. Some of the older init systems might be simpler to describe or get started but lead to more confusing situations in the long run.

[dead]
Re:Everything that uses configuration files should report wh... by monkeywork on Sunday June 25, 2023 @01:34PM (#36470711)
not sure how you thought your comment here would be useful. If snark is the only option sometimes it's better to just close the browser.
Re:Everything that uses configuration files should report wh... by wpietri on Sunday June 25, 2023 @01:14PM (#36470473)
Well that's hilarious too, in that I just pointed you to a bigger context.
Re:Everything that uses configuration files should report wh... by andmarios on Sunday June 25, 2023 @07:04PM (#36473569)
Users are only supposed to know about `/etc`. The rest of the directories are useful for distribution maintainers, people who package software for a distribution (but may not be maintainers), and some developers.
Re:Everything that uses configuration files should report wh... by kbenson on Monday June 26, 2023 @12:10PM (#36481674)
That's because some features are targeted at different audiences. End users want simplicity and ease if use. Admin also want those, but they are secondary to determinism, consistency, and ease of tracking changes.

I find the best way to think about systemd is as the result of some people that probably knew the most about init systems remaking init to be consistent, documented, and handle a bunch of new features that different newer init systems had used to good effect.

Then, because regardless of how much those people knew the vast mofority of information about needs was sequestered in 1000 different teams and projects, they had to add a bunch of new features. Repeat that 100 times, and you get what we have today, which is a system that mostly works (and works well if you actually adopt their preferred patterns), but one that also has the craziest and hardest to remember directive names I have ever seen, where slight nuance about how they function means entirely different params.

In a perfect world it would be rewritten with the same features but with all the knowledge of what features are actually needed known and consistently implemented with sane naming from the beginning, but nobody wants to go through that again.

Re:Everything that uses configuration files should report wh... by wpietri on Monday June 26, 2023 @02:00PM (#36483330)
That last bit is especially what interests me about systemd. From the way you describe it, it sounds like they made it mainly to please themselves, and were then forced to accommodate the actual users and actual users. But that they did so grudgingly and partially, again favoring their interests.

Assuming that's how the history went, fine. Everything has a history, and we have to deal with the now.

But my point is that we are not going to deal well with the now, let alone the future, unless we recognize the impact the history has on people. So if people defensively shout "that's not funny" and imply users are wrong for being bothered by the mess, then we're on track to build another mess. We can't do better until we are honest about why it didn't turn out as well as we would have liked.

Re:Everything that uses configuration files should report wh... by kbenson on Monday June 26, 2023 @02:58PM (#36484201)
> it sounds like they made it mainly to please themselves, and were then forced to accommodate the actual users and actual users

I think it's less that than that there were real advances they were after, which they delivered (Poetterings original essays on what it can and should do and where the ideas came from, such as OS X's LaunchD and some things from Windows, etc) referred to numerous things that every sysadmin I knew at the time that read it was excited if could be delivered (but none of use really appreciated what it meant to deliver them).

The issue is not that they initially built it to their own desired, but that the way SysV init worked with just launching bash scripts to start and control the process that eventually should be running meant that a lot of crazy behavior was put into scripts along the years, because when you can write a program to control your program, sometimes it's easier to just put special behavior into your launch script than to patch the real code in question in some way.

When this crashed against systemd's desire to know what's actually running and control the environment perfectly (which is beneficial, it was always a pain to have a process that started fine from your root user shell but not on startup), and strongly disincentivize programs between systemd and the process in question (which a bash script is) for reasons of process and resource tracking (Linux kernel cgroups were just starting to widely be used beneficially around this time), there started to be a mass influx of feature requests for behavior that used to be handled by dedicated bash scripts previously, but now systemd needed to account for.

Combine that with systemd adding real dependency tracking (as well as start order tracking, which is related but not quite the same, leading to the difference in Wants and Requires), and what we have is a system that's just trying to do something vastly more complicated than what SysV init did previously (and that's before we get to the scope creep which caused them to want to take over some other early boot processes to they could be deterministic or whatever, which is also a PITA for many people).

If you're actually interested in the history if this, I recommend reading "systemd, 10 years later: a historical and technical retrospective" at https://blog.darknedgy.net/technology/2020/05/02/0/. That's where most my info on the details come from. I was around in the beginning and was excited to see systemd start, but I didn't actually use it until far later since most the systems I administer don't get changes like that immediately (and it was in an extremely slow release cycle at that time).

If you read the above you may come away with a different perspective than me, but I will say that systemd is very consistent in its operation and very robust in how it tracks processes and whether there's been a problem and restarts are needed, etc, as long as you actually adopt their preferences (which is to say run everything foreground and let systemd deal with STDIN/STDOUT and environment, and have a good pid to start with). If you do that, writing a new service file is extremely easy. Far more easy than it ever was with SysV init. It's a different paradigm, and sometimes it can be a pain when some process doesn't want to play nice, but mostly it just works once you stop fighting it, which is nice, and cuts down on admin time figuring out problems (especially since it just grabs all STDOUT and STDERR for you so random error messages that don't go to logs aren't lost either).

Re:Everything that uses configuration files should report wh... by wpietri on Monday June 26, 2023 @10:25PM (#36488232)
Thanks for the details. I will check out the link.

I should say that "real advances they were after" is not at all incompatible with "made it mainly to please themselves". The things that pleased them may well have been "real advances"; they often are. The question is the extent to which they were prioritizing the needs, capabilities, and interests of the whole audience being served, not just the things they personally thought important or preferable.