]> xenbits.xensource.com Git - libvirt.git/commit
remote: handle autoprobing of driver within virtproxyd
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 23 Jul 2019 10:06:27 +0000 (11:06 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 9 Aug 2019 13:06:31 +0000 (14:06 +0100)
commit55c8d1a95f9736641aab15bd7562db7d6890aceb
treeb491a96198cc6d34f92a1ed58e59cfa9de4612d0
parent463629559d4e534793e69ad84065ab4babc9c021
remote: handle autoprobing of driver within virtproxyd

The virtproxyd daemon is merely responsible for forwarding RPC calls to
one of the other per-driver daemons. As such, it does not have any
drivers loaded and so regular auto-probing logic will not work. We need
it to be able to handle NULL URIs though, so must implement some kind of
alternative probing logic.

When running as root this is quite crude. If a per-driver daemon is
running, its UNIX socket will exist and we can assume it will accept
connections. If the per-driver daemon is not running, but socket
autostart is enabled, we again just assume it will accept connections.

The is not great, however, because a default install may well have
all sockets available for activation. IOW, the virtxend socket may
exist, despite the fact that the libxl driver will not actually work.

When running as non-root this is slightly easier as we only have two
drivers, QEMU and VirtualBox. These daemons will likely not be running
and socket activation won't be used either, as libvirt spawns the
daemon on demand. So we just check whether the daemon actually is
installed.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/remote/Makefile.inc.am
src/remote/remote_daemon_dispatch.c