[Pkg-libvirt-maintainers] Bug#905772: Add interim summary

Christian Ehrhardt christian.ehrhardt at canonical.com
Fri Aug 10 16:30:08 BST 2018


On Fri, Aug 10, 2018 at 3:54 PM Felipe Sateler <fsateler at debian.org> wrote:

>
>
> On Fri, Aug 10, 2018 at 7:42 AM Michael Biebl <biebl at debian.org> wrote:
>
>> Am 10.08.2018 um 13:32 schrieb Christian Ehrhardt:
>> > I think I'd want/need a "dh_systemd_start
>> --no-dependent-services/sockets"
>> > option to intentionally have it generate "just" for libvirt.service and
>> not
>> > the sockets it depends on.
>> > As mentioned, for all of the complexity pulling in the systemd people
>> might
>> > help as well.
>> > So I'm eager to see what they will reply here as well.
>>
>>
>> I guess the complication arises from the fact that
>> dh_installinit/invoke-rc.d directly handles systemd service files if the
>> SysV init script and service file name match.
>> dh_installsystemd only handles those unit files for which no
>> corresponding SysV init script exists.
>>
>> I think the solutions for this could be, to let dh_installsystemd handle
>> all systemd unit files.
>> dh_installinit/invoke-rc.d on the other hand would be updated to only
>> handle SysV init scripts.
>>
>> In the long run I guess this will be less confusing at is clearer which
>> tool is responsible for which task and it makes it easier to override
>> the behaviour in debian/rules.
>>
>> Felipe has been doing some initial work for enable that kind of
>> behaviour at
>> https://salsa.debian.org/debian/init-system-helpers/merge_requests/4
>
>
> 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.
>
> I think the Also= lines in libvirtd.service are superfluous and removing
> them should avoid this problem.
>
> I'm still not sure why we parse Also= for starting. Michael, do you
> remember the rationale?
>

Uh I see, you mean dropping this section from libvirtd.service right?

[Install]
WantedBy=multi-user.target
Also=virtlockd.socket
Also=virtlogd.socket

The above is certainly worth a try - I need to check what I "loose" by that.

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).
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".
Because virtlogd.service has Requires virtlogd.socket and
virtlogd-admin.socket.

You end like:

virtlogd.service - Virtual machine log manager
   Loaded: loaded (/lib/systemd/system/virtlogd.service; indirect; vendor
preset: enabled)
   Active: active (running) since Thu 2018-08-09 05:26:07 UTC; 3h 45min ago
     Docs: man:virtlogd(8)
           https://libvirt.org
 Main PID: 4059 (virtlogd)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/virtlogd.service
           └─4059 /usr/sbin/virtlogd

Aug 09 09:10:37 c2 systemd[1]: Dependency failed for Virtual machine log
manager.
Aug 09 09:10:37 c2 systemd[1]: virtlogd.service: Job virtlogd.service/start
failed with result 'dependency'.

That has RC=1 if run directly.

And as I said, dh_systemd_start code will ignore the RC but dh_installinit
won't
If there is also a good hint on that let us know.



> --
>
> Saludos,
> Felipe Sateler
>


-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-maintainers/attachments/20180810/ed3d8b51/attachment.html>


More information about the Pkg-libvirt-maintainers mailing list