libvirt/src/remote
Daniel P. Berrangé b18c273a24 remote: enable connecting to the per-driver daemons
Historically URIs handled by the remote driver will always connect to
the libvirtd UNIX socket. There will now be one daemon per driver, and
each of these has its own UNIX sockets to connect to.

It will still be possible to run the traditional monolithic libvirtd
though, which will have the original UNIX socket path.

In addition there is a virproxyd daemon that doesn't run any drivers,
but provides proxying for clients accessing libvirt over IP sockets, or
tunnelling to the legacy libvirtd UNIX socket path.

Finally when running inside a daemon, the remote driver must not reject
connections unconditionally. For example, the QEMU driver needs to be
able to connect to the network driver. The remote driver must thus be
willing to handle connections even when inside the daemon, provided no
local driver is registered.

This refactoring enables the remote driver to be able to connect to the
per-driver daemons. The URI parameter "mode" accepts the values "auto",
"direct" and "legacy" to control which daemons are connected to.

The client side libvirt.conf config file also supports a "remote_mode"
setting which is used if the URI parameter is not set.

If neither the config file or URI parameter set a mode, then "auto"
is used, whereby the client looks to see which sockets actually exist
right now.

The remote driver will only ever spawn the per-driver daemons, or
the legacy libvirtd. It won't ever try to spawn virtproxyd, as
that is only there for IP based connectivity, or for access from
legacy remote clients.

If connecting to a remote host over any kind of ssh tunnel, for now we
must assume only the legacy socket exists. A future patch will introduce
a netcat replacement that is tailored for libvirt to make remote
tunnelling easier.

The configure arg '--with-remote-default-mode=legacy|direct' allows
packagers to set a default at build time. If not given, it will default
to legacy mode.

Eventually the default will switch to direct mode. Distros can choose
to do the switch earlier if desired. The main blocker is testing and
suitable SELinux/AppArmor policies.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-08-09 14:06:31 +01:00
..
libvirtd-admin.socket.in remote: conditionalize systemd socket unit files 2019-08-09 14:06:31 +01:00
libvirtd-ro.socket.in remote: conditionalize systemd socket unit files 2019-08-09 14:06:31 +01:00
libvirtd-tcp.socket.in remote: conditionalize systemd socket unit files 2019-08-09 14:06:31 +01:00
libvirtd-tls.socket.in remote: conditionalize systemd socket unit files 2019-08-09 14:06:31 +01:00
libvirtd.aug.in build: don't hardcode /etc in the config related files 2019-08-09 14:06:31 +01:00
libvirtd.conf.in build: don't hardcode /etc in the config related files 2019-08-09 14:06:31 +01:00
libvirtd.libxl.logrotate.in logging: ensure virtlogd rollover takes priority over logrotate 2019-07-12 12:44:59 +01:00
libvirtd.logrotate.in daemon: move logrotate files to src/remote/ 2018-02-22 12:26:57 +00:00
libvirtd.lxc.logrotate.in logging: ensure virtlogd rollover takes priority over logrotate 2019-07-12 12:44:59 +01:00
libvirtd.pod daemon: move libvirtd POD manpage into src/remote/ 2018-02-22 12:21:09 +00:00
libvirtd.policy Do not generate polkit rules file 2018-03-14 12:46:26 +01:00
libvirtd.qemu.logrotate.in logging: ensure virtlogd rollover takes priority over logrotate 2019-07-12 12:44:59 +01:00
libvirtd.rules daemon: move misc libvirtd policy files to src/remote/ 2018-02-22 12:26:50 +00:00
libvirtd.sasl daemon: move misc libvirtd policy files to src/remote/ 2018-02-22 12:26:50 +00:00
libvirtd.service.in build: don't hardcode /etc in the config related files 2019-08-09 14:06:31 +01:00
libvirtd.socket.in remote: conditionalize systemd socket unit files 2019-08-09 14:06:31 +01:00
libvirtd.sysconf remote: update config files to note usage wrt systemd socket activation 2019-07-12 16:55:40 +01:00
libvirtd.sysctl daemon: move misc libvirtd policy files to src/remote/ 2018-02-22 12:26:50 +00:00
lxc_protocol.x Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
Makefile.inc.am remote: handle autoprobing of driver within virtproxyd 2019-08-09 14:06:31 +01:00
qemu_protocol.x Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
remote_daemon_config.c remote: introduce virtproxyd daemon to handle IP connectivity 2019-08-09 14:06:31 +01:00
remote_daemon_config.h remote: conditionalize IP socket usage in libvirtd daemon 2019-08-09 14:06:31 +01:00
remote_daemon_dispatch.c remote: handle autoprobing of driver within virtproxyd 2019-08-09 14:06:31 +01:00
remote_daemon_dispatch.h src/remote: use #pragma once in headers 2019-06-19 17:12:30 +02:00
remote_daemon_stream.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
remote_daemon_stream.h src/remote: use #pragma once in headers 2019-06-19 17:12:30 +02:00
remote_daemon.c remote: introduce virtproxyd daemon to handle IP connectivity 2019-08-09 14:06:31 +01:00
remote_daemon.h remote: open secondary drivers via remote driver if needed 2019-08-09 14:06:31 +01:00
remote_driver.c remote: enable connecting to the per-driver daemons 2019-08-09 14:06:31 +01:00
remote_driver.h remote: enable connecting to the per-driver daemons 2019-08-09 14:06:31 +01:00
remote_protocol.x backup: remote: Trivial whitespace fix 2019-07-30 16:46:55 -05:00
test_libvirtd.aug.in build: don't hardcode /etc in the config related files 2019-08-09 14:06:31 +01:00
virt-guest-shutdown.target.in daemon: move init system files into src/remote/ 2018-02-22 12:21:21 +00:00
virtproxyd.service.in remote: introduce virtproxyd daemon to handle IP connectivity 2019-08-09 14:06:31 +01:00