News for hackers. Stuff that matters.
Re:What 'dependency' means in Unix init systems is underspec... by cyphar on Sunday October 28, 2018 @06:00AM (#18319921)
Socket activation is nice for certain things, like webservers. Unfortunately for other services socket activation can cause you far more headaches. For instance, Docker's default configuration used to be socket activated under systemd -- this was changed because it meant on-reboot that you wouldn't have any containers running until someone tried to do an administrative command (that used docker.sock).

Socket activation is more meant to allow for on-demand starting of services without losing connections -- and the design shows that this is the main purpose. For many services, "having a connection" doesn't mean the service is ready yet.

I think that having a notification system for a service to tell the init system it is ready would be nice, though the "obvious" way of doing it (rt signals) wouldn't work for unprivileged services.

Re:What 'dependency' means in Unix init systems is underspec... by Spivak on Sunday October 28, 2018 @08:53AM (#18320387)
But in systemd there's no reason you can't have a service enabled on boot and socket activation. It's a little redundant but it can be good to catch some corner cases: like you can always issue docker commands even if Docker isn't ready.
Re:What 'dependency' means in Unix init systems is underspec... by bonzini on Sunday October 28, 2018 @06:29AM (#18320010)
The systemd notification system uses sockets. See https://www.freedesktop.org/software/systemd/man/sd_notify.h...

It looks like it has grown a bit since the last time I saw the manpage...

Re:What 'dependency' means in Unix init systems is underspec... by Too on Sunday October 28, 2018 @08:07AM (#18320277)
Systemd can wait for dbus services to be fully ready instead of just process start. Iirc there is also a way to use the watchdog apis for this if you have other types of ipc than dbus.