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

Re: [libvirt] [PATCH 10/11] spec: Modularize the storage driver




On 02/08/2017 11:27 AM, Peter Krempa wrote:
> Create a new set of sub-packages containing the new storage driver
> modules so that certain heavy-weight backends (gluster, rbd) can be
> installed separately only if required.
> 
> To keep backward compatibility the 'libvirt-driver-storage' package
> will be turned into a virtual package pulling in all the new storage
> backend sub-packages. The storage driver module will be moved into
> libvirt-driver-storage-core including the filesystem backend which is
> mandatory.
> 
> This then allows to make libvirt-daemon-driver-qemu depend only on the
> core of the storage driver.
> 
> All other meta-packages still depend on the full storage driver and thus
> pull in all the backends.
> ---
>  libvirt.spec.in | 168 +++++++++++++++++++++++++++++++++++++++++++++++---------
>  1 file changed, 143 insertions(+), 25 deletions(-)
> 

This type of change is further out of my wheelhouse, but I'll leave a
few thoughts anyway...

I note this too is missing the zfs and vstorage (whether that matters or
not).

I guess the one question/concern I'd have here would be dealing with
various install processing options. I'm assuming the simple case of
applying the updated package finds everything correctly. It's a few
"edge" cases that I wonder about. It just seems any time we adjust the
rpm installation we run into strange issues, but it doesn't happen often
enough for me to recall what "common" issues may be ;-)

Since I don't typically use rpm installs, this also gets me thinking
about 'make install' type environments and if those get everything
updated properly too. That is the dependency stuff in Makefile's.

John
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index 3098ed2dd..9b2ca1c42 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -583,35 +583,13 @@ Requires: libvirt-daemon = %{version}-%{release}
>  The secret driver plugin for the libvirtd daemon, providing
>  an implementation of the secret key APIs.
> 
> -
> -%package daemon-driver-storage
> -Summary: Storage driver plugin for the libvirtd daemon
> +%package daemon-driver-storage-core
> +Summary: Storage driver plugin including base backends for the libvirtd daemon
>  Group: Development/Libraries
>  Requires: libvirt-daemon = %{version}-%{release}
>  Requires: nfs-utils
>  # For mkfs
>  Requires: util-linux
> -# For glusterfs
> -%if 0%{?fedora}
> -Requires: glusterfs-client >= 2.0.1
> -%endif
> -# gluster cli tool for pool discovery
> -%if (0%{?fedora} || 0%{?with_storage_gluster})
> -Requires: /usr/sbin/gluster
> -%endif
> -# For LVM drivers
> -Requires: lvm2
> -# For ISCSI driver
> -Requires: iscsi-initiator-utils
> -# For disk driver
> -Requires: parted
> -Requires: device-mapper
> -# For multipath support
> -Requires: device-mapper
> -%if %{with_storage_sheepdog}
> -# For Sheepdog support
> -Requires: sheepdog
> -%endif
>  %if %{with_qemu}
>  # From QEMU RPMs
>  Requires: /usr/bin/qemu-img
> @@ -622,6 +600,128 @@ Requires: /usr/sbin/qcow-create
>      %endif
>  %endif
> 
> +%description daemon-driver-storage-core
> +The storage driver plugin for the libvirtd daemon, providing
> +an implementation of the storage APIs using files, local disks, LVM, SCSI,
> +iSCSI, and multipath storage.
> +
> +%package daemon-driver-storage-logical
> +Summary: Storage driver plugin for lvm volumes
> +Group: Development/Libraries
> +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
> +Requires: lvm2
> +
> +%description daemon-driver-storage-logical
> +The storage driver backend adding implementation of the storage APIs for block
> +volumes using lvm.
> +
> +
> +%package daemon-driver-storage-disk
> +Summary: Storage driver plugin for disk
> +Group: Development/Libraries
> +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
> +Requires: parted
> +Requires: device-mapper
> +
> +%description daemon-driver-storage-disk
> +The storage driver backend adding implementation of the storage APIs for block
> +volumes using the host disks.
> +
> +
> +%package daemon-driver-storage-scsi
> +Summary: Storage driver plugin for local scsi devices
> +Group: Development/Libraries
> +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
> +
> +%description daemon-driver-storage-scsi
> +The storage driver backend adding implementation of the storage APIs for scsi
> +host devices.
> +
> +
> +%package daemon-driver-storage-iscsi
> +Summary: Storage driver plugin for iscsi
> +Group: Development/Libraries
> +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
> +Requires: iscsi-initiator-utils
> +
> +%description daemon-driver-storage-iscsi
> +The storage driver backend adding implementation of the storage APIs for iscsi
> +volumes using the host iscsi stack.
> +
> +
> +%package daemon-driver-storage-mpath
> +Summary: Storage driver plugin for multipath volumes
> +Group: Development/Libraries
> +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
> +Requires: device-mapper
> +
> +%description daemon-driver-storage-mpath
> +The storage driver backend adding implementation of the storage APIs for
> +multipath storage using device mapper.
> +
> +
> +%if %{with_storage_gluster}
> +%package daemon-driver-storage-gluster
> +Summary: Storage driver plugin for gluster
> +Group: Development/Libraries
> +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
> +    %if 0%{?fedora}
> +Requires: glusterfs-client >= 2.0.1
> +    %endif
> +    %if (0%{?fedora} || 0%{?with_storage_gluster})
> +Requires: /usr/sbin/gluster
> +    %endif
> +
> +%description daemon-driver-storage-gluster
> +The storage driver backend adding implementation of the storage APIs for gluster
> +volumes using libgfapi.
> +%endif
> +
> +
> +%if %{with_storage_rbd}
> +%package daemon-driver-storage-rbd
> +Summary: Storage driver plugin for rbd
> +Group: Development/Libraries
> +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
> +
> +%description daemon-driver-storage-rbd
> +The storage driver backend adding implementation of the storage APIs for rbd
> +volumes using the ceph protocol.
> +%endif
> +
> +
> +%if %{with_storage_sheepdog}
> +%package daemon-driver-storage-sheepdog
> +Summary: Storage driver plugin for sheepdog
> +Group: Development/Libraries
> +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
> +Requires: sheepdog
> +
> +%description daemon-driver-storage-sheepdog
> +The storage driver backend adding implementation of the storage APIs for
> +sheepdog volumes using.
> +%endif
> +
> +
> +%package daemon-driver-storage
> +Summary: Storage driver plugin including all backends for the libvirtd daemon
> +Group: Development/Libraries
> +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
> +Requires: libvirt-daemon-driver-storage-disk = %{version}-%{release}
> +Requires: libvirt-daemon-driver-storage-logical = %{version}-%{release}
> +Requires: libvirt-daemon-driver-storage-scsi = %{version}-%{release}
> +Requires: libvirt-daemon-driver-storage-iscsi = %{version}-%{release}
> +Requires: libvirt-daemon-driver-storage-mpath = %{version}-%{release}
> +%if %{with_storage_gluster}
> +Requires: libvirt-daemon-driver-storage-gluster = %{version}-%{release}
> +%endif
> +%if %{with_storage_rbd}
> +Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release}
> +%endif
> +%if %{with_storage_sheepdog}
> +Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release}
> +%endif
> +
>  %description daemon-driver-storage
>  The storage driver plugin for the libvirtd daemon, providing
>  an implementation of the storage APIs using LVM, iSCSI,
> @@ -635,7 +735,7 @@ Group: Development/Libraries
>  Requires: libvirt-daemon = %{version}-%{release}
>  # There really is a hard cross-driver dependency here
>  Requires: libvirt-daemon-driver-network = %{version}-%{release}
> -Requires: libvirt-daemon-driver-storage = %{version}-%{release}
> +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
>  Requires: /usr/bin/qemu-img
>  # For image compression
>  Requires: gzip
> @@ -1689,21 +1789,39 @@ exit 0
>  %{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so
> 
>  %files daemon-driver-storage
> +
> +%files daemon-driver-storage-core
>  %attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
>  %{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so
>  %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_fs.so
> +
> +%files daemon-driver-storage-disk
>  %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_disk.so
> +
> +%files daemon-driver-storage-logical
>  %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_logical.so
> +
> +%files daemon-driver-storage-scsi
>  %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_scsi.so
> +
> +%files daemon-driver-storage-iscsi
>  %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi.so
> +
> +%files daemon-driver-storage-mpath
>  %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_mpath.so
> +
>  %if %{with_storage_gluster}
> +%files daemon-driver-storage-gluster
>  %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_gluster.so
>  %endif
> +
>  %if %{with_storage_rbd}
> +%files daemon-driver-storage-rbd
>  %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_rbd.so
>  %endif
> +
>  %if %{with_storage_sheepdog}
> +%files daemon-driver-storage-sheepdog
>  %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so
>  %endif
> 


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