On 31 May 2016 at 14:53, Terry Burton <t...@terryburton.co.uk> wrote: > On 27 May 2016 at 14:12, Marc Haber <mh+debian-b...@zugschlus.de> wrote: >> On Fri, May 20, 2016 at 02:03:08AM +0100, Terry Burton wrote: <...snip...> >>> A general problem that I've noticed which might cause us to modify the >>> isc-dhcp-server.target approach is that the following commands will >>> not have the expected effect: >>> >>> service isc-dhcp-server {start,stop,restart} >>> systemctl {start,stop,restart} isc-dhcp-server >>> >>> (1) It doesn't appear as though you can invoke .target unit files >>> using /usr/sbin/service. This'll drive some purists nuts! >> >> I think this is something on systemd upstream's agenda to make people >> migrate to the new, vendor lock-in interface asap. >> >>> (2) Additionally, these commands as-is will actually invoke LSB >>> compatibility and trigger the sys-v init script rather than the native >>> isc-dhcp-server.target unit file. >> >> Ouch. I consider this a bug in Debian's systemd packaging. >> >>> (3) The packaging would need to do something ensure that the >>> isc-dhcp-server init script (via LSB) and isc-dhcp-server.target unit >>> are not both started at boot. >> >> If this is a common issue for packages shipping both a sysv init >> script and systemd units, it's up to systemd in Debian to fix this IMO. > > .service overrides LSB cleanly whereas .target does not. .target seems > to be a powerful mechanism for controlling groups of service units > under a single unit of control but it's not clear (to me) that that is > precisely the intention of the systemd folks... I'm see if I can raise > consensus about this. If it is intended that target to works in this > way then it is clear that /usr/sbin/service should be patched to allow > .target to override LSB.
Okay, I've now seen this [1] which blesses target units as a mechanism for multiple service unit control, and the related open issue regarding propagation of reload actions from targets to services [2] (which doesn't affect isc-dhcp-server). So to make target units a first order citizen would require changes to at init-system-helpers scripts [3] and systemd (/lib/lsb/init-functions.d/40-systemd) [4]. [1] https://lists.freedesktop.org/archives/systemd-devel/2015-July/033628.html [2] https://github.com/systemd/systemd/issues/710 [3] https://sources.debian.net/src/init-system-helpers/1.34/script/ [4] https://sources.debian.net/src/systemd/230-1/debian/extra/init-functions.d/40-systemd/