Re: generation of virtproxd socket files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 9, 2021 at 12:09 AM Jim Fehlig <jfehlig@xxxxxxxx> wrote:
>
> Hi All,
>
> I received a report [1] and verified that virtproxyd*.socket files have broken
> syntax. E.g. from virtproxyd.socket
>
> [Unit]
> Description=Libvirt proxy local socket
> Before=virtproxyd.service
> libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket
> libvirtd-tls.socket
>
> virtproxyd.socket should 'Conflicts' with the libvirtd sockets. I suspect this
> regressed in the switch to meson. I checked a libvirt 6.0.0 installation and
> indeed it has
>
> Conflicts=libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket
> libvirtd-tcp.socket libvirtd-tls.socket
>
> I blame it on Monday and my mind stuck in the weekend, but I spent too much time
> trying to figure out how those socket files are generated before writing this
> mail. It would be much appreciated if someone can give me a nudge in the right
> direction :-).

*point*
-> src/remote/meson.build
227     virt_daemon_units += {
228       'service': 'virtproxyd',
229       'service_in': files('virtproxyd.service.in'),
230       'name': 'Libvirt proxy',
231       'sockprefix': 'libvirt',
232       'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ],
233       'deps': libvirtd_socket_conflicts,
234     }

-> src/meson.build
 195 # virt_daemon_units:
 196 #   generate libvirt daemon systemd unit files
 197 #   * service - name of the service (required)
 198 #   * service_in - service source file (required)
 199 #   * name - socket description (required)
 200 #   * sockprefix - socket prefix name (required)
 201 #   * sockets - array of additional sockets (optional, default [
'main', 'ro', 'admin' ])
 202 #   * socket_$name_in - additional socket source files (optional,
default remote/libvirtd.socket.in )
 203 #   * deps - socket dependencies (optional, default '')
 204 #   * conflicts - if the service conflicts with libvirtd
(optional, true)
 205 virt_daemon_units = []
...
 792     foreach unit : virt_daemon_units
 793       unit_conf = configuration_data()
 794       unit_conf.set('runstatedir', runstatedir)
 795       unit_conf.set('sbindir', sbindir)
 796       unit_conf.set('sysconfdir', sysconfdir)
 797       unit_conf.set('name', unit['name'])
 798       unit_conf.set('service', unit['service'])
 799       unit_conf.set('sockprefix', unit['sockprefix'])
 800       unit_conf.set('deps', unit.get('deps', ''))
 801       if conf.has('WITH_POLKIT')
 802         unit_conf.set('mode', '0666')
 803       else
 804         unit_conf.set('mode', '0600')
 805       endif
...

Also see: https://gitlab.com/libvirt/libvirt/-/commit/dd4f2c73ad7f9fc0eae5325d5bf5786afd3a467e

So if not just an error/mistake somewhere, then setting
socket_$name_in and providing such a file with your needs could be a
start

> Regards,
> Jim
>
> [1] https://bugzilla.opensuse.org/show_bug.cgi?id=1181838
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux