<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 10, 2018 at 11:30 AM Christian Ehrhardt <<a href="mailto:christian.ehrhardt@canonical.com">christian.ehrhardt@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 10, 2018 at 3:54 PM Felipe Sateler <<a href="mailto:fsateler@debian.org" target="_blank">fsateler@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 10, 2018 at 7:42 AM Michael Biebl <<a href="mailto:biebl@debian.org" target="_blank">biebl@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 10.08.2018 um 13:32 schrieb Christian Ehrhardt:<br>
> I think I'd want/need a "dh_systemd_start --no-dependent-services/sockets"<br>
> option to intentionally have it generate "just" for libvirt.service and not<br>
> the sockets it depends on.<br>
> As mentioned, for all of the complexity pulling in the systemd people might<br>
> help as well.<br>
> So I'm eager to see what they will reply here as well.<br>
<br>
<br>
I guess the complication arises from the fact that<br>
dh_installinit/invoke-rc.d directly handles systemd service files if the<br>
SysV init script and service file name match.<br>
dh_installsystemd only handles those unit files for which no<br>
corresponding SysV init script exists.<br>
<br>
I think the solutions for this could be, to let dh_installsystemd handle<br>
all systemd unit files.<br>
dh_installinit/invoke-rc.d on the other hand would be updated to only<br>
handle SysV init scripts.<br>
<br>
In the long run I guess this will be less confusing at is clearer which<br>
tool is responsible for which task and it makes it easier to override<br>
the behaviour in debian/rules.<br>
<br>
Felipe has been doing some initial work for enable that kind of<br>
behaviour at<br>
<a href="https://salsa.debian.org/debian/init-system-helpers/merge_requests/4" rel="noreferrer" target="_blank">https://salsa.debian.org/debian/init-system-helpers/merge_requests/4</a></blockquote><div><br></div><div>This should help, but then you get the next problem: dh_installsystemd parses the Also= lines, and generates deb-systemd-invoke for all referenced units.</div><div><br></div><div>I think the Also= lines in libvirtd.service are superfluous and removing them should avoid this problem. </div><div><br></div><div>I'm still not sure why we parse Also= for starting. Michael, do you remember the rationale?</div></div></div></blockquote><div><br></div><div>Uh I see, you mean dropping this section from libvirtd.service right?</div><div><br></div>[Install]<br>WantedBy=multi-user.target<br>Also=virtlockd.socket<br>Also=virtlogd.socket<div><br></div><div>The above is certainly worth a try - I need to check what I "loose" by that.</div></div></div></blockquote><div><br></div><div>I'd say nothing. libvirtd.service already Requires the sockets, so they will be pulled in anyway. </div><div><br></div><div>Note that the Also= lines are actively harmful. If you want to disable automatic start at boot, and instead rely on socket activation, doing `systemctl disable libvirtd.service` will also disable the sockets.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>I'd still need to drop virtlogd sysV script as the "invoke.rc virtlogd" will complain about missing dependencies (the new .socket for it can't be started since the service is already running).</div><div>The dh_systemd_start generated code triggers "start" and ignores the retval, the dh_installinit code through invoke.rc calls start but fails since systemd replied "I'm running but there are dependency issues".</div><div>Because virtlogd.service has Requires virtlogd.socket and virtlogd-admin.socket.</div></div></div></blockquote><div><br></div><div>Yes, this is the part that could be addressed with the merge request Michael referenced.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br>Saludos,<br>Felipe Sateler</div></div>