Earlier quoted context omitted.
I don't hate it but I certainly wish to avoid it for as long as possible. I see no advantages over alternative modern init systems and a ton of disadvantages. I think it's bloated, even if you can disable much of it, I don't care for the binary log format, and I don't want to support something that is encouraging so much dependency and unnecessary inter-connectedness. Not to mention it doesn't have the best security…
What's your favorite init system?
Devuan – Debian Without Systemd
191–200 of 221 posts
Re: Devuan – Debian Without Systemd
#192Earlier quoted context omitted.
Init scripts were horrible Here's a dinit service file for starting my bluetooth daemon: type = process command = /usr/lib/dinit/dbus-wait-for -s -f 4 -n org.bluez /usr/lib/bluetooth/bluetoothd smooth-recovery = true logfile = /var/log/dinit/bluetoothd.log depends-on = dbus depends-on = local.target before = login.target ready-notification = pipefd:4 This is about as complicated as it gets - ones I make myself might…
I still would love somebody to explain to me what's "dodgy" about a shell script that runs the commands you want run...
Debian did have a fairly good init builder that attempted to do some form of dependency ordering and trickery to get things done in the right order and in the right time, where you wrote a service-like configuration file and than rebuilt the initscript. The builder then compiled the configuration files into an generated shell script. Redhat did something similar if I recall right.
Manually editing the generated shell script was seen as both dodgy, brittle and dangerous given that it could be arbitrary changed by any installed package. Some packages also sed and awk directly at the generated init script.
Re: Devuan – Debian Without Systemd
#193Earlier quoted context omitted.
Init scripts were horrible Here's a dinit service file for starting my bluetooth daemon: type = process command = /usr/lib/dinit/dbus-wait-for -s -f 4 -n org.bluez /usr/lib/bluetooth/bluetoothd smooth-recovery = true logfile = /var/log/dinit/bluetoothd.log depends-on = dbus depends-on = local.target before = login.target ready-notification = pipefd:4 This is about as complicated as it gets - ones I make myself might…
I still would love somebody to explain to me what's "dodgy" about a shell script that runs the commands you want run...
Stashing the PID somewhere and writing code to use the PID to work out if the process is still running and hasn't crashed so you can report a status on it. It's just a waste of one's own time doing this repeatedly and there are ways to do it badly. Every initscript repeated the work.
You could probably do something quite good with bash if you provided a library of functions and demanded that scripts be written to use them.
Re: Devuan – Debian Without Systemd
#194Earlier quoted context omitted.
How is it someone's else's fault for that systemd has dependencies or that others depend on systemd? If I use and like Firefox, and others depend on Firefox, or Firefox depend on others, then it's Firefox fault for you choosing Firefox? I really don't understand the argument you're trying to make. You had choices before systemd, and you still have choices even though systemd is widespread, what's the problem? It isn'…
OK you're missing the historical context here. To make this story extremely short, the author of Systemd was already known for another project that was causing problems to Linux users but was shipped early. And when Systemd was released, it has several issues, too, so some distros like Debian withheld the switch. But at some point the folks at Red Hat decided to tie Systemd to the login mechanism for Gnome. I don't b…
Re: Devuan – Debian Without Systemd
#195Earlier quoted context omitted.
Ok, yes, I wasn't aware of the history, I use whatever my distribution uses as default, and been doing that for decades now, as that tends to be less hassle, so been using systemd for a while because of that. With this new knowledge about the history, I still feel the same as the original question. AFAIK, no one is forcing people/distributions to adopt systemd. It might be easier, and most takes the easiest route, bu…
The problem is mostly that programs started depending on aspects of systemd that are both very complex, and difficult/impossible to implement without ending up with systemd. Systemd's components don't play well with established standards (sometimes not running standalone at all), which contributes to the feeling of having to buy into the whole ecosystem just to use a small part of it, just for that one bit of a certa…
Here's my favorite (quickly searched for, this links to other threads): https://www.reddit.com/r/programming/comments/4ldewx/systemd...
As far as I know systemd never changed the default, people only stopped complaining because distros now override it.
Re: Devuan – Debian Without Systemd
#196Earlier quoted context omitted.
OK you're missing the historical context here. To make this story extremely short, the author of Systemd was already known for another project that was causing problems to Linux users but was shipped early. And when Systemd was released, it has several issues, too, so some distros like Debian withheld the switch. But at some point the folks at Red Hat decided to tie Systemd to the login mechanism for Gnome. I don't b…
Citing PulseAudio adds nothing here. Distros decided to ship it early, just like systemd later ... that choice wasn’t pushed by Poettering. Dragging in an earlier project without making an actual technical or governance argument is just character framing. It’s not evidence, it’s a smear.
Re: Devuan – Debian Without Systemd
#197Earlier quoted context omitted.
I still would love somebody to explain to me what's "dodgy" about a shell script that runs the commands you want run...
I think it's the brittleness. Tomorrow your ethernet adapter is enp4s1 instead of enp3s0 (because of systemd) so your rc script doesn't set up networking and you have to fix it.
Re: Devuan – Debian Without Systemd
#198Earlier quoted context omitted.
I think it's the brittleness. Tomorrow your ethernet adapter is enp4s1 instead of enp3s0 (because of systemd) so your rc script doesn't set up networking and you have to fix it.
Yeah devfs was better at that. A static dev tree was better still.
Re: Devuan – Debian Without Systemd
#199Earlier quoted context omitted.
I wrote a lot of daemontools wrappers and non-shell forking daemons. Doing this is really, really error prone and fragile. Why the hell should I have to learn about double forking and PIDfe validation (and process groups and pty-or-not and all those other esoterica that daemontools still requires you to engage with if you want to do something outlandish like “run a program with a graphical component at boot”) just to…
You shouldn't. You should let it run in the foreground and let the system manager switch to the background before running it, if it wants to. This has many advantages, mostly simplicity. I am not familiar with daemontools but I think it includes something similar to runit, which likes your processes to run in the foreground.
However, the happy path is very, very narrow. It breaks down as soon as you have to deal with:
- Set(e)uid daemons or any background service that needs to run as a different user than the one launching the service.
- Programs that report readiness somehow (the equivalent of the "notify" systemd type). Plenty of services won't crash when they should, so a standard for "it's all the way up" is useful.
- Start timeouts and failures. If daemontools is your only authority of the "status" result, recognizing a started-but-hung service is hard. Even if your service has some other "yes, the binary exists, but is it working?" check, getting daemontools+init to probe that and appropriately react to start timeouts can be fussy.
- Services that themselves spawn subprocesses (either forking or running separate child programs). Parent-process crashes are a recipe for orphaned things running and consuming resources/doing who knows what. You can solve this with a cgroup/namespacing/prctls to control orphan reparenting, but that's super hard to get right. Systemd has a one-liner for "on stop, kill this service and any program that was ever spawned in its tree". Having implemented the equivalent code to KillMode=control-group a in a few different "this has to be really reliable and bug-free" contexts now, having to manually manage this when managing services is a recipe for disaster. You'd think you know when your services will/won't have child processes, but you'd be wrong a lot (e.g. oddball JVM tracing sidecars, Pythons that always run a multiprocessing helper even if they don't use multiprocessing, Redis sometimes forking and doing bgsave, Erlang with its DNS-management child procs, literally anything ever written in Perl, Postgres, and so on. You would think that most managed child processes in big, mature software projects will know to kill themselves if their parent crashes for whatever reason. You would be wrong).
- Inter-service dependencies. Yes, many init systems take that on, but now you have the daemonization system and the init system--separate tools to configure, with overlap and expectations about each other.
- Race conditions around setting up pidfiles/locks when first deploying a service. Sure, once it's installed flock(2) will work fine, but what if you're installing a new distribution of the service and the installer picks a different lock directory from the one in use by the running service?
There are a lot more things I could list, but I'd rather not go back there. Having to manage this stuff by hand was a pretty low point for our field--as fully clued-in as sysadmins felt, we made a lot of mistakes, and made an environment that was deeply hostile to non-expert operators who just wanted to run a service and forget about it.
Systemd's far from perfect, but the challenges of doing this stuff with daemontools and friends weren't just "this is a worse implementation than systemd"; they were "this is existentially harder than using systemd precisely because it follows the 'unix philosophy' and maximizes control of (and thus responsibility for) an area where simple cases are often ... not".
Re: Devuan – Debian Without Systemd
#200Earlier quoted context omitted.
Yeah devfs was better at that. A static dev tree was better still.
Device numbers are dynamically allocated. The main handle is the name. Network interfaces don't go in /dev anyway and are not files