Re: [PATCH 8/8] Removing probing of secondary drivers

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

 



On Wed, Jan 21, 2015 at 11:08:54AM +0100, Michal Privoznik wrote:
> On 20.01.2015 17:37, Daniel P. Berrange wrote:
> > For stateless, client side drivers, it is never correct to
> > probe for secondary drivers. It is only ever appropriate to
> > use the secondary driver that is associated with the
> > hypervisor in question. As a result the ESX & HyperV drivers
> > have both been forced to do hacks where they register no-op
> > drivers for the ones they don't implement.
> > 
> > For stateful, server side drivers, we always just want to
> > use the same built-in shared driver. The exception is
> > virtualbox which is really a stateless driver and so wants
> > to use its own server side secondary drivers. To deal with
> > this virtualbox has to be built as 3 separate loadable
> > modules to allow registration to work in the right order.
> > 
> > This can all be simplified by introducing a new struct
> > recording the precise set of secondary drivers each
> > hypervisor driver wants
> > 
> > struct _virConnectDriver {
> >     virHypervisorDriverPtr hypervisorDriver;
> >     virInterfaceDriverPtr interfaceDriver;
> >     virNetworkDriverPtr networkDriver;
> >     virNodeDeviceDriverPtr nodeDeviceDriver;
> >     virNWFilterDriverPtr nwfilterDriver;
> >     virSecretDriverPtr secretDriver;
> >     virStorageDriverPtr storageDriver;
> > };
> > 
> > Instead of registering the hypervisor driver, we now
> > just register a virConnectDriver instead. This allows
> > us to remove all probing of secondary drivers. Once we
> > have chosen the primary driver, we immediately know the
> > correct secondary drivers to use.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> > ---
> >  daemon/libvirtd.c                       |  19 +-
> >  src/Makefile.am                         |  63 +------
> >  src/bhyve/bhyve_driver.c                |  14 +-
> >  src/check-driverimpls.pl                |   3 +-
> >  src/datatypes.c                         |  12 --
> >  src/driver-hypervisor.h                 |   3 -
> >  src/driver-interface.h                  |   9 -
> >  src/driver-network.h                    |  11 +-
> >  src/driver-nodedev.h                    |   8 +-
> >  src/driver-nwfilter.h                   |  13 +-
> >  src/driver-secret.h                     |  12 +-
> >  src/driver-storage.h                    |  12 +-
> >  src/driver.h                            |  54 +++---
> >  src/esx/esx_device_monitor.c            |  74 --------
> >  src/esx/esx_device_monitor.h            |  28 ---
> >  src/esx/esx_driver.c                    |  25 +--
> >  src/esx/esx_interface_driver.c          |  37 +---
> >  src/esx/esx_interface_driver.h          |   4 +-
> >  src/esx/esx_network_driver.c            |  37 +---
> >  src/esx/esx_network_driver.h            |   4 +-
> >  src/esx/esx_nwfilter_driver.c           |  74 --------
> >  src/esx/esx_nwfilter_driver.h           |  28 ---
> >  src/esx/esx_secret_driver.c             |  72 -------
> >  src/esx/esx_secret_driver.h             |  27 ---
> >  src/esx/esx_storage_driver.c            |  37 +---
> >  src/esx/esx_storage_driver.h            |   4 +-
> >  src/hyperv/hyperv_device_monitor.c      |  71 -------
> >  src/hyperv/hyperv_device_monitor.h      |  28 ---
> >  src/hyperv/hyperv_driver.c              |  25 +--
> >  src/hyperv/hyperv_interface_driver.c    |  71 -------
> >  src/hyperv/hyperv_interface_driver.h    |  28 ---
> >  src/hyperv/hyperv_network_driver.c      |  71 -------
> >  src/hyperv/hyperv_network_driver.h      |  28 ---
> >  src/hyperv/hyperv_nwfilter_driver.c     |  71 -------
> >  src/hyperv/hyperv_nwfilter_driver.h     |  28 ---
> >  src/hyperv/hyperv_secret_driver.c       |  71 -------
> >  src/hyperv/hyperv_secret_driver.h       |  28 ---
> >  src/hyperv/hyperv_storage_driver.c      |  71 -------
> >  src/hyperv/hyperv_storage_driver.h      |  28 ---
> >  src/interface/interface_backend_netcf.c |  26 +--
> >  src/interface/interface_backend_udev.c  |  25 +--
> >  src/libvirt.c                           | 323 ++++++++++++++------------------
> >  src/libvirt_private.syms                |  14 +-
> >  src/libxl/libxl_driver.c                |  10 +-
> >  src/lxc/lxc_driver.c                    |  10 +-
> >  src/network/bridge_driver.c             |  25 +--
> >  src/node_device/node_device_driver.c    |  10 +-
> >  src/node_device/node_device_hal.c       |  26 +--
> >  src/node_device/node_device_udev.c      |  23 +--
> >  src/nwfilter/nwfilter_driver.c          |  25 +--
> >  src/openvz/openvz_driver.c              |  12 +-
> >  src/phyp/phyp_driver.c                  |  64 +------
> >  src/qemu/qemu_driver.c                  |  10 +-
> >  src/remote/remote_driver.c              | 152 ++-------------
> >  src/secret/secret_driver.c              |  25 +--
> >  src/storage/storage_driver.c            |  25 +--
> >  src/test/test_driver.c                  | 156 ++-------------
> >  src/uml/uml_driver.c                    |  10 +-
> >  src/vbox/vbox_common.c                  |   1 -
> >  src/vbox/vbox_driver.c                  |  47 ++---
> >  src/vbox/vbox_network.c                 |  32 ----
> >  src/vbox/vbox_storage.c                 |  30 ---
> >  src/vmware/vmware_driver.c              |  12 +-
> >  src/xen/xen_driver.c                    |  11 +-
> >  src/xenapi/xenapi_driver.c              |  10 +-
> >  tests/qemuxml2argvtest.c                |  17 --
> >  tests/virdrivermoduletest.c             |  18 +-
> >  67 files changed, 336 insertions(+), 2116 deletions(-)
> >  delete mode 100644 src/esx/esx_device_monitor.c
> >  delete mode 100644 src/esx/esx_device_monitor.h
> >  delete mode 100644 src/esx/esx_nwfilter_driver.c
> >  delete mode 100644 src/esx/esx_nwfilter_driver.h
> >  delete mode 100644 src/esx/esx_secret_driver.c
> >  delete mode 100644 src/esx/esx_secret_driver.h
> >  delete mode 100644 src/hyperv/hyperv_device_monitor.c
> >  delete mode 100644 src/hyperv/hyperv_device_monitor.h
> >  delete mode 100644 src/hyperv/hyperv_interface_driver.c
> >  delete mode 100644 src/hyperv/hyperv_interface_driver.h
> >  delete mode 100644 src/hyperv/hyperv_network_driver.c
> >  delete mode 100644 src/hyperv/hyperv_network_driver.h
> >  delete mode 100644 src/hyperv/hyperv_nwfilter_driver.c
> >  delete mode 100644 src/hyperv/hyperv_nwfilter_driver.h
> >  delete mode 100644 src/hyperv/hyperv_secret_driver.c
> >  delete mode 100644 src/hyperv/hyperv_secret_driver.h
> >  delete mode 100644 src/hyperv/hyperv_storage_driver.c
> >  delete mode 100644 src/hyperv/hyperv_storage_driver.h
> 
> Instead of finding a needle in haystack (read pointing out line in
> the diff that needs to be fixed), I'm pasting diff that you need to
> squash in. I'm sure you'll get the idea why:

Hehe, thanks. I forgot that we needed an SDK to compile the
parallels driver now. Any idea if that's in Fedora yet ?

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]