[Pkg-systemd-maintainers] Bug#734007: document implicit After= of service on socket
Russ Allbery
rra at debian.org
Fri Jan 3 00:52:55 GMT 2014
Package: systemd
Version: 204-6
Severity: minor
As part of the discussion in the tech-ctte bug report, there seemed to
be general agreement (I haven't checked the source code) that systemd
automatically adds an implicit After= to a service unit on a socket
unit with the same name. I don't think this is currently documented
in systemd.service(5).
There should probably also be a note under Sockets= saying whether
this implicit After= also applies to any units listed in Sockets=.
It may also be good to note in daemon(7) under Socket-Based Activation
(maybe, or maybe under Writing Systemd Unit Files) that service units
written to support socket activation should consider a Requires= on
the socket unit. Without this, it's possible to get inconsistent
behavior if the service is not configured to start at boot and then
it's started manually, or if the admin disables the socket. This may
be intentional flexibility in some cases, where the service unit is
explicitly written to support either service activation or binding its
own sockets, but I at least found the behavior without Requires= to be
surprising and unexpected.
More information about the Pkg-systemd-maintainers
mailing list