This patch series is the final bit of refactoring needed to start
splitting up libvirtd for real.
The last three patches are not really quite ready for merge, but I've
included them to illustrate what the end result is looking like. I have
taken the approach of adding conditionals into the libvirtd source, so
that we don't end up with 10+ cut+paste copies of all the boilerplate
code. Essentially the virt${DRIVER}d daemons are functionally identical
to libvirtd, except that anything todo with TCP is disabled, and they
only load a single driver. This does mean they are somewhat "fatter"
than they need to be (mostly in terms of number of worker threads in
every daemon), but I figure we can optimize later if desired.
Obviously splitting off storage, nwfilter and network drivers is going
to require extra work first because of the callbacks they have into virt
drivers. Hence I've started with the secret driver as the trivial thing
to prove the general concept. The nodedev and interface drivers will
also be trivial, at least to start with. I'm contemplating whether we
should put the host device assignment tracking into the nodedev driver
itself.
With this series, if you connect to the QEMU driver, you should
automatically get a connection to the separate virtsecretd
daemon. Similarly when the QEMU driver tries to open the secret driver,
it should end up talking to the virtsecretd daemon via the remote driver.
Daniel P. Berrangé (14):
build: prevent unloading of all public libraries
remote: stop trying to load Xen driver module
build: prevent unloading of dlopen'd modules
driver: don't keep a pointer to the loaded library handle
driver: fix handling of error return from finding resource
driver: tighten check for whether loadable module exists or not
driver: use normal error reporting APIs when loading modules
driver: add option to make missing drivers a fatal problem
remote: honour errors from virDriverLoadModule
remote: split URI scheme into driver and transport upfront
remote: refactor code for building UNIX socket paths
remote: conditionalize sources for some pieces to become optional
remote: allow remote driver to connect to alternative daemons
secret: introduce virtsecretd daemon
src/Makefile.am | 12 ++-
src/driver.c | 91 ++++++++++------
src/driver.h | 9 +-
src/libvirt.c | 24 +++++
src/remote/Makefile.inc.am | 20 ++++
src/remote/remote_daemon.c | 196 ++++++++++++++++++++--------------
src/remote/remote_daemon_config.c | 36 +++++--
src/remote/remote_daemon_config.h | 9 +-
src/remote/remote_daemon_dispatch.c | 11 +-
src/remote/remote_driver.c | 202 ++++++++++++++++++++++++------------
src/remote/remote_driver.h | 4 -
src/secret/Makefile.inc.am | 54 ++++++++++
src/storage/storage_backend.c | 13 +--
src/util/virfile.c | 4 +
tests/virdrivermoduletest.c | 2 +-
15 files changed, 483 insertions(+), 204 deletions(-)
--
2.14.3