[PATCH V2 0/9] spec: Decompose the daemon subpackage

This is a V2 of: https://listman.redhat.com/archives/libvir-list/2022-December/236073.html Original RFC: https://listman.redhat.com/archives/libvir-list/2022-November/235924.html The end goal is to remove the libvirt-dameon dependency on the various libvirt-daemon-driver-foo subpackages, allowing installation of a modular daemon configuration without the traditional monolithic libvirtd. Change from V1: - Change name of new subpackage libvirt-daemon-client to libvirt-daemon-common - Rename the libvirt-lock-sanlock package to libvirt-daemon-plugin-sanlock - Update rpm-deployment kbase article - Misc review comments addressed Jim Fehlig (9): spec: Move virtlockd to a new subpackage libvirt-daemon-lock spec: Move virtlogd to a new subpackage libvirt-daemon-log spec: Move virtproxyd to a new subpackage libvirt-daemon-proxy spec: Move lockd plugin to a new subpackage spec: Rename the libvirt-lock-sanlock subpackage spec: Move common files to a new subpackage libvirt-daemon-common spec: Remove libvirt-daemon dependency from drivers spec: Remove libvirt-daemon dependency from hypervisor subpackages kbase: Update rpm-deployment.rst with new subpackages docs/kbase/rpm-deployment.rst | 38 ++++- libvirt.spec.in | 294 +++++++++++++++++++++++----------- 2 files changed, 235 insertions(+), 97 deletions(-) -- 2.38.1

Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 61 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 31ff8ea01e..6de03ec76a 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -429,6 +429,7 @@ Summary: Server side daemon and supporting files for libvirt library # The client side, i.e. shared libs are in a subpackage Requires: libvirt-libs = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} # The libvirt-guests.sh script requires virsh from libvirt-client subpackage, # but not every deployment wants to use libvirt-guests service. Using # Recommends here will install libvirt-client by default (if available), but @@ -477,6 +478,14 @@ Server side daemon required to manage the virtualization capabilities of recent versions of Linux. Requires a hypervisor specific sub-RPM for specific drivers. +%package daemon-lock +Summary: Server side daemon for managing locks +Requires: libvirt-libs = %{version}-%{release} + +%description daemon-lock +Server side daemon used to manage locks held against virtual machine +resources + %package daemon-config-network Summary: Default configuration files for the libvirtd daemon @@ -1392,7 +1401,7 @@ fi \ %define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket %pre daemon -%libvirt_sysconfig_pre libvirtd virtproxyd virtlogd virtlockd libvirt-guests +%libvirt_sysconfig_pre libvirtd virtproxyd virtlogd libvirt-guests # 'libvirt' group is just to allow password-less polkit access to # libvirtd. The uid number is irrelevant, so we use dynamic allocation # described at the above link. @@ -1401,7 +1410,6 @@ exit 0 %post daemon %libvirt_daemon_systemd_post_priv virtlogd -%libvirt_daemon_systemd_post_priv virtlockd %if %{with_modular_daemons} %libvirt_daemon_systemd_post_inet virtproxyd %else @@ -1415,17 +1423,16 @@ exit 0 %libvirt_daemon_systemd_preun_inet libvirtd %libvirt_daemon_systemd_preun_inet virtproxyd %libvirt_daemon_systemd_preun_priv virtlogd -%libvirt_daemon_systemd_preun_priv virtlockd %postun daemon /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then - /bin/systemctl reload-or-try-restart virtlockd.service virtlogd.service >/dev/null 2>&1 || : + /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || : fi %systemd_postun libvirt-guests.service %posttrans daemon -%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd virtlockd libvirt-guests +%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd libvirt-guests if test %libvirt_daemon_needs_restart libvirtd then # See if user has previously modified their install to @@ -1459,6 +1466,24 @@ then fi %libvirt_daemon_finish_restart libvirtd +%pre daemon-lock +%libvirt_sysconfig_pre virtlockd + +%post daemon-lock +%libvirt_daemon_systemd_post_priv virtlockd + +%preun daemon-lock +%libvirt_daemon_systemd_preun_priv virtlockd + +%postun daemon-lock +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || : +fi + +%posttrans daemon-lock +%libvirt_sysconfig_posttrans virtlockd + %pre daemon-driver-network %libvirt_sysconfig_pre virtnetworkd @@ -1740,14 +1765,10 @@ exit 0 %{_unitdir}/virtlogd.service %{_unitdir}/virtlogd.socket %{_unitdir}/virtlogd-admin.socket -%{_unitdir}/virtlockd.service -%{_unitdir}/virtlockd.socket -%{_unitdir}/virtlockd-admin.socket %{_unitdir}/libvirt-guests.service %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf %config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf %config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf -%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd @@ -1767,14 +1788,8 @@ exit 0 %{_datadir}/augeas/lenses/tests/test_libvirtd.aug %{_datadir}/augeas/lenses/virtlogd.aug %{_datadir}/augeas/lenses/tests/test_virtlogd.aug -%{_datadir}/augeas/lenses/virtlockd.aug -%{_datadir}/augeas/lenses/tests/test_virtlockd.aug %{_datadir}/augeas/lenses/virtproxyd.aug %{_datadir}/augeas/lenses/tests/test_virtproxyd.aug -%{_datadir}/augeas/lenses/libvirt_lockd.aug -%if %{with_qemu} -%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug -%endif %{_datadir}/polkit-1/actions/org.libvirt.unix.policy %{_datadir}/polkit-1/actions/org.libvirt.api.policy %{_datadir}/polkit-1/rules.d/50-libvirt.rules @@ -1784,7 +1799,6 @@ exit 0 %attr(0755, root, root) %{_sbindir}/libvirtd %attr(0755, root, root) %{_sbindir}/virtproxyd %attr(0755, root, root) %{_sbindir}/virtlogd -%attr(0755, root, root) %{_sbindir}/virtlockd %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh %{_mandir}/man1/virt-admin.1* %{_mandir}/man1/virt-host-validate.1* @@ -1792,12 +1806,25 @@ exit 0 %{_mandir}/man8/libvirt-guests.8* %{_mandir}/man8/libvirtd.8* %{_mandir}/man8/virtlogd.8* -%{_mandir}/man8/virtlockd.8* %{_mandir}/man8/virtproxyd.8* %{_bindir}/virt-host-validate %{_bindir}/virt-admin %{_datadir}/bash-completion/completions/virt-admin +%files daemon-lock +%{_unitdir}/virtlockd.service +%{_unitdir}/virtlockd.socket +%{_unitdir}/virtlockd-admin.socket +%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf +%{_datadir}/augeas/lenses/virtlockd.aug +%{_datadir}/augeas/lenses/tests/test_virtlockd.aug +%{_datadir}/augeas/lenses/libvirt_lockd.aug +%if %{with_qemu} +%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug +%endif +%attr(0755, root, root) %{_sbindir}/virtlockd +%{_mandir}/man8/virtlockd.8* + %files daemon-config-network %dir %{_datadir}/libvirt/networks/ %{_datadir}/libvirt/networks/default.xml -- 2.38.1

On Tue, Dec 13, 2022 at 05:30:54PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 61 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 17 deletions(-)
Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Dec 14, 2022 at 09:31:31AM -0800, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:30:54PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 61 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 17 deletions(-)
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Actually, adding the libvirt-daemon-lock dependency to the sanlock package should happen in this patch instead of in 5/9. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Dec 14, 2022 at 09:50:47AM -0800, Andrea Bolognani wrote:
On Wed, Dec 14, 2022 at 09:31:31AM -0800, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:30:54PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 61 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 17 deletions(-)
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Actually, adding the libvirt-daemon-lock dependency to the sanlock package should happen in this patch instead of in 5/9.
No we shouldn't, sanlock has no requirement for virlockd to be present. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Thu, Dec 15, 2022 at 09:22:34AM +0000, Daniel P. Berrangé wrote:
On Wed, Dec 14, 2022 at 09:50:47AM -0800, Andrea Bolognani wrote:
Actually, adding the libvirt-daemon-lock dependency to the sanlock package should happen in this patch instead of in 5/9.
No we shouldn't, sanlock has no requirement for virlockd to be present.
Right, my bad. -- Andrea Bolognani / Red Hat / Virtualization

Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 53 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 6de03ec76a..3383011b79 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -430,6 +430,7 @@ Summary: Server side daemon and supporting files for libvirt library # The client side, i.e. shared libs are in a subpackage Requires: libvirt-libs = %{version}-%{release} Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} # The libvirt-guests.sh script requires virsh from libvirt-client subpackage, # but not every deployment wants to use libvirt-guests service. Using # Recommends here will install libvirt-client by default (if available), but @@ -486,6 +487,13 @@ Requires: libvirt-libs = %{version}-%{release} Server side daemon used to manage locks held against virtual machine resources +%package daemon-log +Summary: Server side daemon for managing logs +Requires: libvirt-libs = %{version}-%{release} + +%description daemon-log +Server side daemon used to manage logs from virtual machine consoles + %package daemon-config-network Summary: Default configuration files for the libvirtd daemon @@ -1401,7 +1409,7 @@ fi \ %define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket %pre daemon -%libvirt_sysconfig_pre libvirtd virtproxyd virtlogd libvirt-guests +%libvirt_sysconfig_pre libvirtd virtproxyd libvirt-guests # 'libvirt' group is just to allow password-less polkit access to # libvirtd. The uid number is irrelevant, so we use dynamic allocation # described at the above link. @@ -1409,7 +1417,6 @@ getent group libvirt >/dev/null || groupadd -r libvirt exit 0 %post daemon -%libvirt_daemon_systemd_post_priv virtlogd %if %{with_modular_daemons} %libvirt_daemon_systemd_post_inet virtproxyd %else @@ -1422,17 +1429,13 @@ exit 0 %systemd_preun libvirt-guests.service %libvirt_daemon_systemd_preun_inet libvirtd %libvirt_daemon_systemd_preun_inet virtproxyd -%libvirt_daemon_systemd_preun_priv virtlogd %postun daemon /bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || : -fi %systemd_postun libvirt-guests.service %posttrans daemon -%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd libvirt-guests +%libvirt_sysconfig_posttrans libvirtd virtproxyd libvirt-guests if test %libvirt_daemon_needs_restart libvirtd then # See if user has previously modified their install to @@ -1484,6 +1487,24 @@ fi %posttrans daemon-lock %libvirt_sysconfig_posttrans virtlockd +%pre daemon-log +%libvirt_sysconfig_pre virtlogd + +%post daemon-log +%libvirt_daemon_systemd_post_priv virtlogd + +%preun daemon-log +%libvirt_daemon_systemd_preun_priv virtlogd + +%postun daemon-log +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || : +fi + +%posttrans daemon-log +%libvirt_sysconfig_posttrans virtlogd + %pre daemon-driver-network %libvirt_sysconfig_pre virtnetworkd @@ -1762,13 +1783,9 @@ exit 0 %{_unitdir}/virtproxyd-tcp.socket %{_unitdir}/virtproxyd-tls.socket %{_unitdir}/virt-guest-shutdown.target -%{_unitdir}/virtlogd.service -%{_unitdir}/virtlogd.socket -%{_unitdir}/virtlogd-admin.socket %{_unitdir}/libvirt-guests.service %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf %config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf -%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd @@ -1786,8 +1803,6 @@ exit 0 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so %{_datadir}/augeas/lenses/libvirtd.aug %{_datadir}/augeas/lenses/tests/test_libvirtd.aug -%{_datadir}/augeas/lenses/virtlogd.aug -%{_datadir}/augeas/lenses/tests/test_virtlogd.aug %{_datadir}/augeas/lenses/virtproxyd.aug %{_datadir}/augeas/lenses/tests/test_virtproxyd.aug %{_datadir}/polkit-1/actions/org.libvirt.unix.policy @@ -1798,14 +1813,12 @@ exit 0 %attr(0755, root, root) %{_bindir}/virt-ssh-helper %attr(0755, root, root) %{_sbindir}/libvirtd %attr(0755, root, root) %{_sbindir}/virtproxyd -%attr(0755, root, root) %{_sbindir}/virtlogd %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh %{_mandir}/man1/virt-admin.1* %{_mandir}/man1/virt-host-validate.1* %{_mandir}/man8/virt-ssh-helper.8* %{_mandir}/man8/libvirt-guests.8* %{_mandir}/man8/libvirtd.8* -%{_mandir}/man8/virtlogd.8* %{_mandir}/man8/virtproxyd.8* %{_bindir}/virt-host-validate %{_bindir}/virt-admin @@ -1825,6 +1838,16 @@ exit 0 %attr(0755, root, root) %{_sbindir}/virtlockd %{_mandir}/man8/virtlockd.8* +%files daemon-log +%{_unitdir}/virtlogd.service +%{_unitdir}/virtlogd.socket +%{_unitdir}/virtlogd-admin.socket +%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf +%{_datadir}/augeas/lenses/virtlogd.aug +%{_datadir}/augeas/lenses/tests/test_virtlogd.aug +%attr(0755, root, root) %{_sbindir}/virtlogd +%{_mandir}/man8/virtlogd.8* + %files daemon-config-network %dir %{_datadir}/libvirt/networks/ %{_datadir}/libvirt/networks/default.xml -- 2.38.1

On Tue, Dec 13, 2022 at 05:30:55PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 53 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 15 deletions(-)
Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization

Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 56 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 3383011b79..633cf05100 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -431,6 +431,7 @@ Summary: Server side daemon and supporting files for libvirt library Requires: libvirt-libs = %{version}-%{release} Requires: libvirt-daemon-lock = %{version}-%{release} Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-proxy = %{version}-%{release} # The libvirt-guests.sh script requires virsh from libvirt-client subpackage, # but not every deployment wants to use libvirt-guests service. Using # Recommends here will install libvirt-client by default (if available), but @@ -494,6 +495,14 @@ Requires: libvirt-libs = %{version}-%{release} %description daemon-log Server side daemon used to manage logs from virtual machine consoles +%package daemon-proxy +Summary: Server side daemon providing libvirtd proxy +Requires: libvirt-libs = %{version}-%{release} + +%description daemon-proxy +Server side daemon providing functionality previously provided by +the monolithic libvirtd + %package daemon-config-network Summary: Default configuration files for the libvirtd daemon @@ -1409,7 +1418,7 @@ fi \ %define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket %pre daemon -%libvirt_sysconfig_pre libvirtd virtproxyd libvirt-guests +%libvirt_sysconfig_pre libvirtd libvirt-guests # 'libvirt' group is just to allow password-less polkit access to # libvirtd. The uid number is irrelevant, so we use dynamic allocation # described at the above link. @@ -1417,9 +1426,7 @@ getent group libvirt >/dev/null || groupadd -r libvirt exit 0 %post daemon -%if %{with_modular_daemons} -%libvirt_daemon_systemd_post_inet virtproxyd -%else +%if ! %{with_modular_daemons} %libvirt_daemon_systemd_post_inet libvirtd %endif %systemd_post libvirt-guests.service @@ -1428,14 +1435,13 @@ exit 0 %preun daemon %systemd_preun libvirt-guests.service %libvirt_daemon_systemd_preun_inet libvirtd -%libvirt_daemon_systemd_preun_inet virtproxyd %postun daemon /bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun libvirt-guests.service %posttrans daemon -%libvirt_sysconfig_posttrans libvirtd virtproxyd libvirt-guests +%libvirt_sysconfig_posttrans libvirtd libvirt-guests if test %libvirt_daemon_needs_restart libvirtd then # See if user has previously modified their install to @@ -1505,6 +1511,20 @@ fi %posttrans daemon-log %libvirt_sysconfig_posttrans virtlogd +%pre daemon-proxy +%libvirt_sysconfig_pre virtproxyd + +%post daemon-proxy +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post_inet virtproxyd +%endif + +%preun daemon-proxy +%libvirt_daemon_systemd_preun_inet virtproxyd + +%posttrans daemon-proxy +%libvirt_sysconfig_posttrans virtproxyd + %pre daemon-driver-network %libvirt_sysconfig_pre virtnetworkd @@ -1776,16 +1796,9 @@ exit 0 %{_unitdir}/libvirtd-admin.socket %{_unitdir}/libvirtd-tcp.socket %{_unitdir}/libvirtd-tls.socket -%{_unitdir}/virtproxyd.service -%{_unitdir}/virtproxyd.socket -%{_unitdir}/virtproxyd-ro.socket -%{_unitdir}/virtproxyd-admin.socket -%{_unitdir}/virtproxyd-tcp.socket -%{_unitdir}/virtproxyd-tls.socket %{_unitdir}/virt-guest-shutdown.target %{_unitdir}/libvirt-guests.service %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf -%config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd @@ -1803,8 +1816,6 @@ exit 0 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so %{_datadir}/augeas/lenses/libvirtd.aug %{_datadir}/augeas/lenses/tests/test_libvirtd.aug -%{_datadir}/augeas/lenses/virtproxyd.aug -%{_datadir}/augeas/lenses/tests/test_virtproxyd.aug %{_datadir}/polkit-1/actions/org.libvirt.unix.policy %{_datadir}/polkit-1/actions/org.libvirt.api.policy %{_datadir}/polkit-1/rules.d/50-libvirt.rules @@ -1812,14 +1823,12 @@ exit 0 %attr(0755, root, root) %{_libexecdir}/libvirt_iohelper %attr(0755, root, root) %{_bindir}/virt-ssh-helper %attr(0755, root, root) %{_sbindir}/libvirtd -%attr(0755, root, root) %{_sbindir}/virtproxyd %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh %{_mandir}/man1/virt-admin.1* %{_mandir}/man1/virt-host-validate.1* %{_mandir}/man8/virt-ssh-helper.8* %{_mandir}/man8/libvirt-guests.8* %{_mandir}/man8/libvirtd.8* -%{_mandir}/man8/virtproxyd.8* %{_bindir}/virt-host-validate %{_bindir}/virt-admin %{_datadir}/bash-completion/completions/virt-admin @@ -1848,6 +1857,19 @@ exit 0 %attr(0755, root, root) %{_sbindir}/virtlogd %{_mandir}/man8/virtlogd.8* +%files daemon-proxy +%{_unitdir}/virtproxyd.service +%{_unitdir}/virtproxyd.socket +%{_unitdir}/virtproxyd-ro.socket +%{_unitdir}/virtproxyd-admin.socket +%{_unitdir}/virtproxyd-tcp.socket +%{_unitdir}/virtproxyd-tls.socket +%config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf +%{_datadir}/augeas/lenses/virtproxyd.aug +%{_datadir}/augeas/lenses/tests/test_virtproxyd.aug +%attr(0755, root, root) %{_sbindir}/virtproxyd +%{_mandir}/man8/virtproxyd.8* + %files daemon-config-network %dir %{_datadir}/libvirt/networks/ %{_datadir}/libvirt/networks/default.xml -- 2.38.1

On Tue, Dec 13, 2022 at 05:30:56PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 56 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 17 deletions(-)
Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization

Introduce the libvirt-daemon-plugin-lockd subpackage to provide the client-side lockd plugin for virtlockd. The sanlock plugin also needs the directory %{_libdir}/libvirt/lock-driver, which it currently gets via the libvirt-daemon dependency. Duplicate the directory in the %files section of the sanlock plugin, allowing the libvirt-daemon dependency to be dropped. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 633cf05100..63b29ba6f4 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -430,6 +430,7 @@ Summary: Server side daemon and supporting files for libvirt library # The client side, i.e. shared libs are in a subpackage Requires: libvirt-libs = %{version}-%{release} Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} Requires: libvirt-daemon-log = %{version}-%{release} Requires: libvirt-daemon-proxy = %{version}-%{release} # The libvirt-guests.sh script requires virsh from libvirt-client subpackage, @@ -488,6 +489,13 @@ Requires: libvirt-libs = %{version}-%{release} Server side daemon used to manage locks held against virtual machine resources +%package daemon-plugin-lockd +Summary: lockd client plugin for virtlockd +Requires: libvirt-libs = %{version}-%{release} + +%description daemon-plugin-lockd +A client-side plugin for virtlockd that implements locking using POSIX fcntl advisory locks + %package daemon-log Summary: Server side daemon for managing logs Requires: libvirt-libs = %{version}-%{release} @@ -951,7 +959,6 @@ Summary: Sanlock lock manager plugin for QEMU driver Requires: sanlock >= 2.4 #for virt-sanlock-cleanup require augeas Requires: augeas -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} %description lock-sanlock @@ -1812,8 +1819,6 @@ exit 0 %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/ -%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver -%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so %{_datadir}/augeas/lenses/libvirtd.aug %{_datadir}/augeas/lenses/tests/test_libvirtd.aug %{_datadir}/polkit-1/actions/org.libvirt.unix.policy @@ -1847,6 +1852,10 @@ exit 0 %attr(0755, root, root) %{_sbindir}/virtlockd %{_mandir}/man8/virtlockd.8* +%files daemon-plugin-lockd +%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver +%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so + %files daemon-log %{_unitdir}/virtlogd.service %{_unitdir}/virtlogd.socket @@ -2154,6 +2163,7 @@ exit 0 %if %{with_libxl} %config(noreplace) %{_sysconfdir}/libvirt/libxl-sanlock.conf %endif +%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so %{_datadir}/augeas/lenses/libvirt_sanlock.aug %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug -- 2.38.1

On Tue, Dec 13, 2022 at 05:30:57PM -0700, Jim Fehlig wrote:
Introduce the libvirt-daemon-plugin-lockd subpackage to provide the client-side lockd plugin for virtlockd.
The sanlock plugin also needs the directory %{_libdir}/libvirt/lock-driver, which it currently gets via the libvirt-daemon dependency. Duplicate the directory in the %files section of the sanlock plugin, allowing the libvirt-daemon dependency to be dropped.
I think it would be slightly neater if you introduced the new package with a dependency on libvirt-daemon and left the existing dependency in the sanlock package alone. Then, after introducing the libvirt-daemon-common package, you could replace those dependencies with the more lightweight ones at the same time as you're doing so for all other packages.
+%package daemon-plugin-lockd +Summary: lockd client plugin for virtlockd +Requires: libvirt-libs = %{version}-%{release}
I think you should have a dependency on libvirt-daemon-lock here, since the lockd.so plugin requires virtlockd in order to work. -- Andrea Bolognani / Red Hat / Virtualization

On 12/14/22 10:47, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:30:57PM -0700, Jim Fehlig wrote:
Introduce the libvirt-daemon-plugin-lockd subpackage to provide the client-side lockd plugin for virtlockd.
The sanlock plugin also needs the directory %{_libdir}/libvirt/lock-driver, which it currently gets via the libvirt-daemon dependency. Duplicate the directory in the %files section of the sanlock plugin, allowing the libvirt-daemon dependency to be dropped.
I think it would be slightly neater if you introduced the new package with a dependency on libvirt-daemon and left the existing dependency in the sanlock package alone. Then, after introducing the libvirt-daemon-common package, you could replace those dependencies with the more lightweight ones at the same time as you're doing so for all other packages.
That patch starts with libvirt-daemon getting a dependency on libvirt-daemon-plugin-lockd :-). That dependency is needed to ensure we still get lockd.so when installing libvirt-daemon. What if I leave the directory in libvirt-daemon in this patch, then duplicate it and drop the libvirt-daemon dependency when renaming the sanlock package? Regards, Jim

On Tue, Dec 13, 2022 at 05:30:57PM -0700, Jim Fehlig wrote:
Introduce the libvirt-daemon-plugin-lockd subpackage to provide the client-side lockd plugin for virtlockd.
The sanlock plugin also needs the directory %{_libdir}/libvirt/lock-driver, which it currently gets via the libvirt-daemon dependency. Duplicate the directory in the %files section of the sanlock plugin, allowing the libvirt-daemon dependency to be dropped.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

The new name "libvirt-daemon-plugin-sanlock" provides consistency with the newly introduced "libvirt-daemon-plugin-lockd" subpackage. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 63b29ba6f4..8aa8ff6516 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -954,14 +954,17 @@ Requires: pkgconfig Include header files & development libraries for the libvirt C library. %if %{with_sanlock} -%package lock-sanlock +%package daemon-plugin-sanlock Summary: Sanlock lock manager plugin for QEMU driver Requires: sanlock >= 2.4 #for virt-sanlock-cleanup require augeas Requires: augeas Requires: libvirt-libs = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Obsoletes: libvirt-lock-sanlock < 8.10.0 +Provides: libvirt-lock-sanlock = %{version}-%{release} -%description lock-sanlock +%description daemon-plugin-sanlock Includes the Sanlock lock manager plugin for the QEMU driver %endif @@ -2156,7 +2159,7 @@ exit 0 %endif %if %{with_sanlock} -%files lock-sanlock +%files daemon-plugin-sanlock %if %{with_qemu} %config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf %endif -- 2.38.1

On Tue, Dec 13, 2022 at 05:30:58PM -0700, Jim Fehlig wrote:
+%package daemon-plugin-sanlock Summary: Sanlock lock manager plugin for QEMU driver Requires: sanlock >= 2.4 #for virt-sanlock-cleanup require augeas Requires: augeas Requires: libvirt-libs = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Obsoletes: libvirt-lock-sanlock < 8.10.0
The version number should be 9.0.0 here. -- Andrea Bolognani / Red Hat / Virtualization

On Tue, Dec 13, 2022 at 05:30:58PM -0700, Jim Fehlig wrote:
The new name "libvirt-daemon-plugin-sanlock" provides consistency with the newly introduced "libvirt-daemon-plugin-lockd" subpackage.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 63b29ba6f4..8aa8ff6516 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -954,14 +954,17 @@ Requires: pkgconfig Include header files & development libraries for the libvirt C library.
%if %{with_sanlock} -%package lock-sanlock +%package daemon-plugin-sanlock Summary: Sanlock lock manager plugin for QEMU driver Requires: sanlock >= 2.4 #for virt-sanlock-cleanup require augeas Requires: augeas Requires: libvirt-libs = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release}
The sanlock plugin has no dependancy on virtlockd, so we should not require that to be installed. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Move virt-admin, virt-host-validate, virt-ssh-helper, libvirt-guests and miscellaneous files/directories to a new libvirt-daemon-common subpackage. These files and utilities are used by other core libvirt daemons Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 70 +++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 8aa8ff6516..309bc76b3b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -429,15 +429,11 @@ Summary: Server side daemon and supporting files for libvirt library # The client side, i.e. shared libs are in a subpackage Requires: libvirt-libs = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-daemon-lock = %{version}-%{release} Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} Requires: libvirt-daemon-log = %{version}-%{release} Requires: libvirt-daemon-proxy = %{version}-%{release} -# The libvirt-guests.sh script requires virsh from libvirt-client subpackage, -# but not every deployment wants to use libvirt-guests service. Using -# Recommends here will install libvirt-client by default (if available), but -# RPM won't complain if the package is unavailable, masked, or removed later. -Recommends: libvirt-client = %{version}-%{release} # netcat is needed on the server side so that clients that have # libvirt < 6.9.0 can connect, but newer versions will prefer # virt-ssh-helper. Making this a Recommends means that it gets @@ -450,7 +446,6 @@ Requires: module-init-tools Requires: iproute # for /sbin/tc Requires: iproute-tc -Requires: polkit >= 0.112 %if %{with_dmidecode} # For virConnectGetSysinfo Requires: dmidecode @@ -464,6 +459,21 @@ Requires: numad Requires: dbus # For uid creation during pre Requires(pre): shadow-utils + +%description daemon +Server side daemon required to manage the virtualization capabilities +of recent versions of Linux. Requires a hypervisor specific sub-RPM +for specific drivers. + +%package daemon-common +Summary: Files and utilities used by daemons +Requires: libvirt-libs = %{version}-%{release} +# The libvirt-guests.sh script requires virsh from libvirt-client subpackage, +# but not every deployment wants to use libvirt-guests service. Using +# Recommends here will install libvirt-client by default (if available), but +# RPM won't complain if the package is unavailable, masked, or removed later. +Recommends: libvirt-client = %{version}-%{release} +Requires: polkit >= 0.112 # Needed by /usr/libexec/libvirt-guests.sh script. %if 0%{?fedora} >= 37 Requires: gettext-runtime @@ -476,10 +486,8 @@ Obsoletes: libvirt-admin < 7.3.0 Provides: libvirt-admin = %{version}-%{release} Obsoletes: libvirt-bash-completion < 7.3.0 -%description daemon -Server side daemon required to manage the virtualization capabilities -of recent versions of Linux. Requires a hypervisor specific sub-RPM -for specific drivers. +%description daemon-common +Miscellaneous files and utilities used by other libvirt daemons %package daemon-lock Summary: Server side daemon for managing locks @@ -1428,7 +1436,7 @@ fi \ %define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket %pre daemon -%libvirt_sysconfig_pre libvirtd libvirt-guests +%libvirt_sysconfig_pre libvirtd # 'libvirt' group is just to allow password-less polkit access to # libvirtd. The uid number is irrelevant, so we use dynamic allocation # described at the above link. @@ -1439,19 +1447,13 @@ exit 0 %if ! %{with_modular_daemons} %libvirt_daemon_systemd_post_inet libvirtd %endif -%systemd_post libvirt-guests.service %libvirt_daemon_schedule_restart libvirtd %preun daemon -%systemd_preun libvirt-guests.service %libvirt_daemon_systemd_preun_inet libvirtd -%postun daemon -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -%systemd_postun libvirt-guests.service - %posttrans daemon -%libvirt_sysconfig_posttrans libvirtd libvirt-guests +%libvirt_sysconfig_posttrans libvirtd if test %libvirt_daemon_needs_restart libvirtd then # See if user has previously modified their install to @@ -1485,6 +1487,22 @@ then fi %libvirt_daemon_finish_restart libvirtd +%pre daemon-common +%libvirt_sysconfig_pre libvirt-guests + +%post daemon-common +%systemd_post libvirt-guests.service + +%preun daemon-common +%systemd_preun libvirt-guests.service + +%postun daemon-common +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +%systemd_postun libvirt-guests.service + +%posttrans daemon-common +%libvirt_sysconfig_posttrans libvirt-guests + %pre daemon-lock %libvirt_sysconfig_pre virtlockd @@ -1806,12 +1824,18 @@ exit 0 %{_unitdir}/libvirtd-admin.socket %{_unitdir}/libvirtd-tcp.socket %{_unitdir}/libvirtd-tls.socket -%{_unitdir}/virt-guest-shutdown.target -%{_unitdir}/libvirt-guests.service %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf -%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd +%{_datadir}/augeas/lenses/libvirtd.aug +%{_datadir}/augeas/lenses/tests/test_libvirtd.aug +%attr(0755, root, root) %{_sbindir}/libvirtd +%{_mandir}/man8/libvirtd.8* + +%files daemon-common +%{_unitdir}/virt-guest-shutdown.target +%{_unitdir}/libvirt-guests.service +%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %dir %{_datadir}/libvirt/ %ghost %dir %{_rundir}/libvirt/ %ghost %dir %{_rundir}/libvirt/common/ @@ -1822,21 +1846,17 @@ exit 0 %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/ -%{_datadir}/augeas/lenses/libvirtd.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd.aug %{_datadir}/polkit-1/actions/org.libvirt.unix.policy %{_datadir}/polkit-1/actions/org.libvirt.api.policy %{_datadir}/polkit-1/rules.d/50-libvirt.rules %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ %attr(0755, root, root) %{_libexecdir}/libvirt_iohelper %attr(0755, root, root) %{_bindir}/virt-ssh-helper -%attr(0755, root, root) %{_sbindir}/libvirtd %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh %{_mandir}/man1/virt-admin.1* %{_mandir}/man1/virt-host-validate.1* %{_mandir}/man8/virt-ssh-helper.8* %{_mandir}/man8/libvirt-guests.8* -%{_mandir}/man8/libvirtd.8* %{_bindir}/virt-host-validate %{_bindir}/virt-admin %{_datadir}/bash-completion/completions/virt-admin -- 2.38.1

On Tue, Dec 13, 2022 at 05:30:59PM -0700, Jim Fehlig wrote:
@@ -450,7 +446,6 @@ Requires: module-init-tools Requires: iproute # for /sbin/tc Requires: iproute-tc -Requires: polkit >= 0.112 %if %{with_dmidecode} # For virConnectGetSysinfo Requires: dmidecode @@ -464,6 +459,21 @@ Requires: numad Requires: dbus # For uid creation during pre Requires(pre): shadow-utils
Have you verified that all of these runtime dependencies are really only needed when running the monolithic daemon? I would expect that, for example, the iproute dependency would have to be moved to the libvirt-daemon-driver-network package and so on. Some of them might even need to be duplicated to ensure that a pure split daemon scenario works correctly. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Dec 14, 2022 at 09:56:28AM -0800, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:30:59PM -0700, Jim Fehlig wrote:
@@ -450,7 +446,6 @@ Requires: module-init-tools Requires: iproute # for /sbin/tc Requires: iproute-tc -Requires: polkit >= 0.112 %if %{with_dmidecode} # For virConnectGetSysinfo Requires: dmidecode @@ -464,6 +459,21 @@ Requires: numad Requires: dbus # For uid creation during pre Requires(pre): shadow-utils
Have you verified that all of these runtime dependencies are really only needed when running the monolithic daemon?
I would expect that, for example, the iproute dependency would have to be moved to the libvirt-daemon-driver-network package and so on.
Some of them might even need to be duplicated to ensure that a pure split daemon scenario works correctly.
And I think the %pre snippet that handles creation of the libvirt group needs to be moved to the common package as well, to allow members of the group to perform privileged operations in a pure split daemon deployment. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Dec 14, 2022 at 09:56:28AM -0800, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:30:59PM -0700, Jim Fehlig wrote:
@@ -450,7 +446,6 @@ Requires: module-init-tools Requires: iproute # for /sbin/tc Requires: iproute-tc -Requires: polkit >= 0.112 %if %{with_dmidecode} # For virConnectGetSysinfo Requires: dmidecode @@ -464,6 +459,21 @@ Requires: numad Requires: dbus # For uid creation during pre Requires(pre): shadow-utils
Have you verified that all of these runtime dependencies are really only needed when running the monolithic daemon?
I would expect that, for example, the iproute dependency would have to be moved to the libvirt-daemon-driver-network package and so on.
The 'ip' commands are used in common code for virnetdev*.c and I'm fairly confident that's callable from at least the LXC driver also, possibly the QEMUdriver too With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

To avoid needlessly installing the monolithic daemon, replace the libvirt-daemon dependency with libvirt-daemon-common. The common subpackage contains all the utilities (e.g. virt-admin) and files used by other daemons. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 309bc76b3b..a39c2d170b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -522,7 +522,6 @@ the monolithic libvirtd %package daemon-config-network Summary: Default configuration files for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} %description daemon-config-network @@ -531,7 +530,6 @@ Default configuration files for setting up NAT based networking %package daemon-config-nwfilter Summary: Network filter configuration files for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} %description daemon-config-nwfilter @@ -539,7 +537,7 @@ Network filter configuration files for cleaning guest traffic %package daemon-driver-network Summary: Network driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Requires: dnsmasq >= 2.41 Requires: iptables @@ -551,7 +549,7 @@ bridge capabilities. %package daemon-driver-nwfilter Summary: Nwfilter driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Requires: iptables Requires: ebtables @@ -563,7 +561,7 @@ iptables and ip6tables capabilities %package daemon-driver-nodedev Summary: Nodedev driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} # needed for device enumeration Requires: systemd >= 185 @@ -577,7 +575,7 @@ capabilities. %package daemon-driver-interface Summary: Interface driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} %if %{with_netcf} Requires: netcf-libs >= 0.2.2 @@ -589,7 +587,7 @@ an implementation of the host network interface APIs. %package daemon-driver-secret Summary: Secret driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} %description daemon-driver-secret @@ -598,7 +596,7 @@ an implementation of the secret key APIs. %package daemon-driver-storage-core Summary: Storage driver plugin including base backends for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Requires: nfs-utils # For mkfs @@ -749,7 +747,7 @@ parted and more. %if %{with_qemu} %package daemon-driver-qemu Summary: QEMU driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Requires: /usr/bin/qemu-img # For image compression @@ -769,7 +767,7 @@ QEMU %if %{with_lxc} %package daemon-driver-lxc Summary: LXC driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} # There really is a hard cross-driver dependency here Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -784,7 +782,7 @@ the Linux kernel %if %{with_vbox} %package daemon-driver-vbox Summary: VirtualBox driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} %description daemon-driver-vbox @@ -796,7 +794,7 @@ VirtualBox %if %{with_libxl} %package daemon-driver-libxl Summary: Libxl driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Obsoletes: libvirt-daemon-driver-xen < 4.3.0 -- 2.38.1

On Tue, Dec 13, 2022 at 05:31:00PM -0700, Jim Fehlig wrote:
To avoid needlessly installing the monolithic daemon, replace the libvirt-daemon dependency with libvirt-daemon-common. The common subpackage contains all the utilities (e.g. virt-admin) and files used by other daemons.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Remove the libvirt-daemon dependency from the various libvirt-daemon-<hypervisor> subpackages, replacing it with a set of the new sub subpackages providing the same functionality. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index a39c2d170b..c372bca543 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -808,7 +808,11 @@ Libxl %package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -827,7 +831,11 @@ capabilities of the QEMU TCG emulators %package daemon-kvm Summary: Server side daemon & driver required to run KVM guests -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -846,7 +854,7 @@ capabilities of the KVM hypervisor %package daemon-lxc Summary: Server side daemon & driver required to run LXC guests -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-daemon-driver-lxc = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -864,7 +872,10 @@ capabilities of LXC %package daemon-xen Summary: Server side daemon & driver required to run XEN guests -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release} Requires: libvirt-daemon-driver-libxl = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -883,7 +894,7 @@ capabilities of XEN %package daemon-vbox Summary: Server side daemon & driver required to run VirtualBox guests -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-daemon-driver-vbox = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} -- 2.38.1

On Tue, Dec 13, 2022 at 05:31:01PM -0700, Jim Fehlig wrote:
%package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
The sanlock plugin was an optional install before, but now it's a hard dependency. I'm not sure we want that. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Dec 14, 2022 at 09:59:41AM -0800, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:31:01PM -0700, Jim Fehlig wrote:
%package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
The sanlock plugin was an optional install before, but now it's a hard dependency. I'm not sure we want that.
Even if we decide that we do, we should only have this dependency if %{with_sanlock}, otherwise the package will become impossible to install in certain cases. Also we need to be more careful here: we want the more granular dependencies if %{with_modular_daemons}, but otherwise (e.g. RHEL 8) we still want the monolithic daemon. -- Andrea Bolognani / Red Hat / Virtualization

On 12/14/22 10:59, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:31:01PM -0700, Jim Fehlig wrote:
%package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
The sanlock plugin was an optional install before, but now it's a hard dependency. I'm not sure we want that.
No, we don't. I'll remove it in V3. Regards, Jim

On Tue, Dec 13, 2022 at 05:31:01PM -0700, Jim Fehlig wrote:
Remove the libvirt-daemon dependency from the various libvirt-daemon-<hypervisor> subpackages, replacing it with a set of the new sub subpackages providing the same functionality.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index a39c2d170b..c372bca543 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -808,7 +808,11 @@ Libxl %package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
Don't add sanlock in any of these. It pulls in more 3rd party packages and almost no one uses sanlock. Historically we've never installed the sanlock package in any default setup.
Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -827,7 +831,11 @@ capabilities of the QEMU TCG emulators %package daemon-kvm Summary: Server side daemon & driver required to run KVM guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -846,7 +854,7 @@ capabilities of the KVM hypervisor %package daemon-lxc Summary: Server side daemon & driver required to run LXC guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-daemon-driver-lxc = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -864,7 +872,10 @@ capabilities of LXC %package daemon-xen Summary: Server side daemon & driver required to run XEN guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release} Requires: libvirt-daemon-driver-libxl = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -883,7 +894,7 @@ capabilities of XEN %package daemon-vbox Summary: Server side daemon & driver required to run VirtualBox guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-daemon-driver-vbox = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} -- 2.38.1
With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/kbase/rpm-deployment.rst | 38 ++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/docs/kbase/rpm-deployment.rst b/docs/kbase/rpm-deployment.rst index b5ee7fd827..bf2f4f5a6b 100644 --- a/docs/kbase/rpm-deployment.rst +++ b/docs/kbase/rpm-deployment.rst @@ -42,14 +42,17 @@ RPM packages stateful drivers. This package does not contain any drivers, so further packages need to be installed to provide the desired drivers. - In addition to the libvirtd daemon this package also contains the virtlogd, - virtlockd and virtproxyd daemons, plus a number of helpers, configuration - files and other bits necessary to create and admin a virtualization host. + This package depends on libvirt-daemon-common, libvirt-daemon-lock, + libvirt-daemon-plugin-lockd, libvirt-daemon-log, and libvirt-daemon-proxy. - The virt-admin tool, also included in this package, is used for - administrative operations on any libvirt daemons. Most usefully it allows - for logging filters and outputs to be reconfigured on a running daemon - without a restart. +* libvirt-daemon-common + This package contains liibvirt-guests, virt-host-validate, virt-ssh-helper + and other utilities and configuration files necessary to create and + administer a virtualization host. + + The virt-admin tool, used for administrative operations on any of the libvirt + daemons, is also included in this package. It is most useful for reconfiguring + logging filters and outputs on a running daemon without the need for a restart. * libvirt-daemon-config-network @@ -209,6 +212,14 @@ RPM packages features, the subset of libvirt-daemon-driver-XXX packages should be used instead. +* libvirt-daemon-lock + This package provides virtlockd, a server side daemon used to manage locks + held against virtual machine resources. + +* libvirt-daemon-log + This package provides virtlogd, a server side daemon used to manage logs + from virtual machine consoles. + * libvirt-daemon-lxc This is an empty package that exists only as a convenient way to request @@ -222,6 +233,19 @@ RPM packages features, the subset of libvirt-daemon-driver-XXX packages should be used instead. +* libvirt-daemon-plugin-lockd + This package provides the lockd.so module, a daemon plugin for communicating + with a virtlockd configured to use POSIX fcntl advisory locks. + +* libvirt-daemon-plugin-sanlock + This package provides the sanlock.so module, a daemon plugin for communicating + with a virtlockd configured to use sanlock. + +* libvirt-daemon-proxy + This package provides virtproxyd, a server side daemon providing backwards + compatibility for clients expecting to communicate with the traditional, + monolithic libvirtd. + * libvirt-daemon-qemu This is an empty package that exists only as a convenient way to request -- 2.38.1

On Tue, Dec 13, 2022 at 05:31:02PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/kbase/rpm-deployment.rst | 38 ++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/docs/kbase/rpm-deployment.rst b/docs/kbase/rpm-deployment.rst index b5ee7fd827..bf2f4f5a6b 100644 --- a/docs/kbase/rpm-deployment.rst +++ b/docs/kbase/rpm-deployment.rst @@ -42,14 +42,17 @@ RPM packages stateful drivers. This package does not contain any drivers, so further packages need to be installed to provide the desired drivers.
- In addition to the libvirtd daemon this package also contains the virtlogd, - virtlockd and virtproxyd daemons, plus a number of helpers, configuration - files and other bits necessary to create and admin a virtualization host. + This package depends on libvirt-daemon-common, libvirt-daemon-lock, + libvirt-daemon-plugin-lockd, libvirt-daemon-log, and libvirt-daemon-proxy.
We probably want to point out that this package should *not* be installed for new deployments. Looking at the page in its entirety, I think it would make sense to have the "Deployment choices" section first and the "RPM packages" section after it. That is, provide the quick recipes upfront, and leave the finer details for those who are interested in them.
+* libvirt-daemon-common + This package contains liibvirt-guests, virt-host-validate, virt-ssh-helper
*libvirt-guests
+* libvirt-daemon-plugin-lockd + This package provides the lockd.so module, a daemon plugin for communicating + with a virtlockd configured to use POSIX fcntl advisory locks. + +* libvirt-daemon-plugin-sanlock + This package provides the sanlock.so module, a daemon plugin for communicating + with a virtlockd configured to use sanlock.
Based on Dan's explanation, these descriptions are not accurate: the lockd.so module is used by the hypervisor driver to manage locks via virtlockd, while the sanlock.so to do the same via sanlock. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Dec 14, 2022 at 10:08:38AM -0800, Andrea Bolognani wrote:
Looking at the page in its entirety, I think it would make sense to have the "Deployment choices" section first and the "RPM packages" section after it. That is, provide the quick recipes upfront, and leave the finer details for those who are interested in them.
Patches here: https://listman.redhat.com/archives/libvir-list/2022-December/236366.html -- Andrea Bolognani / Red Hat / Virtualization

On 12/14/22 11:08, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:31:02PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/kbase/rpm-deployment.rst | 38 ++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/docs/kbase/rpm-deployment.rst b/docs/kbase/rpm-deployment.rst index b5ee7fd827..bf2f4f5a6b 100644 --- a/docs/kbase/rpm-deployment.rst +++ b/docs/kbase/rpm-deployment.rst @@ -42,14 +42,17 @@ RPM packages stateful drivers. This package does not contain any drivers, so further packages need to be installed to provide the desired drivers.
- In addition to the libvirtd daemon this package also contains the virtlogd, - virtlockd and virtproxyd daemons, plus a number of helpers, configuration - files and other bits necessary to create and admin a virtualization host. + This package depends on libvirt-daemon-common, libvirt-daemon-lock, + libvirt-daemon-plugin-lockd, libvirt-daemon-log, and libvirt-daemon-proxy.
We probably want to point out that this package should *not* be installed for new deployments.
Looking at the page in its entirety, I think it would make sense to have the "Deployment choices" section first and the "RPM packages" section after it. That is, provide the quick recipes upfront, and leave the finer details for those who are interested in them.
Agreed, but it is unrelated to this work. Can it be a separate task?
+* libvirt-daemon-common + This package contains liibvirt-guests, virt-host-validate, virt-ssh-helper
*libvirt-guests
+* libvirt-daemon-plugin-lockd + This package provides the lockd.so module, a daemon plugin for communicating + with a virtlockd configured to use POSIX fcntl advisory locks. + +* libvirt-daemon-plugin-sanlock + This package provides the sanlock.so module, a daemon plugin for communicating + with a virtlockd configured to use sanlock.
Based on Dan's explanation, these descriptions are not accurate: the lockd.so module is used by the hypervisor driver to manage locks via virtlockd, while the sanlock.so to do the same via sanlock.
I think the first one is accurate. lockd.so is a plugin for daemons to communicate with virtlockd. Daniel wrote "virtqemud locks(sic) the lockd.so plugin, as lockd.so provides the client impl to talk to virtlockd. Think of lockd.so as being equiv of libvirt.so". I assume sanlock.so is the same. It provides the client impl for daemons to talk to virtlockd's sanlock backend. Regardless, suggestions on the actual text to put here would be much appreciated. Regards, Jim

On 12/14/22 14:55, Jim Fehlig wrote:
On 12/14/22 11:08, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:31:02PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/kbase/rpm-deployment.rst | 38 ++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/docs/kbase/rpm-deployment.rst b/docs/kbase/rpm-deployment.rst index b5ee7fd827..bf2f4f5a6b 100644 --- a/docs/kbase/rpm-deployment.rst +++ b/docs/kbase/rpm-deployment.rst @@ -42,14 +42,17 @@ RPM packages stateful drivers. This package does not contain any drivers, so further packages need to be installed to provide the desired drivers.
- In addition to the libvirtd daemon this package also contains the virtlogd, - virtlockd and virtproxyd daemons, plus a number of helpers, configuration - files and other bits necessary to create and admin a virtualization host. + This package depends on libvirt-daemon-common, libvirt-daemon-lock, + libvirt-daemon-plugin-lockd, libvirt-daemon-log, and libvirt-daemon-proxy.
We probably want to point out that this package should *not* be installed for new deployments.
Looking at the page in its entirety, I think it would make sense to have the "Deployment choices" section first and the "RPM packages" section after it. That is, provide the quick recipes upfront, and leave the finer details for those who are interested in them.
Agreed, but it is unrelated to this work. Can it be a separate task?
I should have read more mail before responding :-). Regards, Jim

On Wed, Dec 14, 2022 at 02:55:30PM -0700, Jim Fehlig wrote:
On 12/14/22 11:08, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:31:02PM -0700, Jim Fehlig wrote:
+* libvirt-daemon-plugin-lockd + This package provides the lockd.so module, a daemon plugin for communicating + with a virtlockd configured to use POSIX fcntl advisory locks. + +* libvirt-daemon-plugin-sanlock + This package provides the sanlock.so module, a daemon plugin for communicating + with a virtlockd configured to use sanlock.
Based on Dan's explanation, these descriptions are not accurate: the lockd.so module is used by the hypervisor driver to manage locks via virtlockd, while the sanlock.so to do the same via sanlock.
I think the first one is accurate. lockd.so is a plugin for daemons to communicate with virtlockd. Daniel wrote
"virtqemud locks(sic) the lockd.so plugin, as lockd.so provides the client impl to talk to virtlockd. Think of lockd.so as being equiv of libvirt.so".
I assume sanlock.so is the same. It provides the client impl for daemons to talk to virtlockd's sanlock backend. Regardless, suggestions on the actual text to put here would be much appreciated.
My understanding is that configuring the hypervisor driver to use sanlock results in it loading the sanlock.so plugin and calling out to sanlock directly, without going through virtlockd. virlockd is used when lockd.so is loaded. Basically the plugins provide the implementation of the locking interface, with the backend being sanlock and virtlockd respectively. But I'm not 100% positive so let's wait for Dan to either confirm or debunk this take O:-) Assuming it's correct, the descriptions could be along the lines of * libvirt-daemon-plugin-lockd This package provides the lockd.so module, a daemon plugin that implements disk locking using POSIX fcntl advisory locks via communication with the virtlockd daemon. * libvirt-daemon-plugin-sanlock This package provides the sanlock.so module, a daemon plugin that implements disk locking via communication with the sanlock daemon. -- Andrea Bolognani / Red Hat / Virtualization

On Thu, Dec 15, 2022 at 07:50:43AM -0800, Andrea Bolognani wrote:
On Wed, Dec 14, 2022 at 02:55:30PM -0700, Jim Fehlig wrote:
On 12/14/22 11:08, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:31:02PM -0700, Jim Fehlig wrote:
+* libvirt-daemon-plugin-lockd + This package provides the lockd.so module, a daemon plugin for communicating + with a virtlockd configured to use POSIX fcntl advisory locks. + +* libvirt-daemon-plugin-sanlock + This package provides the sanlock.so module, a daemon plugin for communicating + with a virtlockd configured to use sanlock.
Based on Dan's explanation, these descriptions are not accurate: the lockd.so module is used by the hypervisor driver to manage locks via virtlockd, while the sanlock.so to do the same via sanlock.
I think the first one is accurate. lockd.so is a plugin for daemons to communicate with virtlockd. Daniel wrote
"virtqemud locks(sic) the lockd.so plugin, as lockd.so provides the client impl to talk to virtlockd. Think of lockd.so as being equiv of libvirt.so".
I assume sanlock.so is the same. It provides the client impl for daemons to talk to virtlockd's sanlock backend. Regardless, suggestions on the actual text to put here would be much appreciated.
My understanding is that configuring the hypervisor driver to use sanlock results in it loading the sanlock.so plugin and calling out to sanlock directly, without going through virtlockd. virlockd is used when lockd.so is loaded. Basically the plugins provide the implementation of the locking interface, with the backend being sanlock and virtlockd respectively.
Yes, sanlock has its own daemon that's the equivalent of virtlockd. Libvirt only needs to proivde the client side of sanlock (our plugin). With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On 12/15/22 08:50, Andrea Bolognani wrote:
On Wed, Dec 14, 2022 at 02:55:30PM -0700, Jim Fehlig wrote:
On 12/14/22 11:08, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 05:31:02PM -0700, Jim Fehlig wrote:
+* libvirt-daemon-plugin-lockd + This package provides the lockd.so module, a daemon plugin for communicating + with a virtlockd configured to use POSIX fcntl advisory locks. + +* libvirt-daemon-plugin-sanlock + This package provides the sanlock.so module, a daemon plugin for communicating + with a virtlockd configured to use sanlock.
Based on Dan's explanation, these descriptions are not accurate: the lockd.so module is used by the hypervisor driver to manage locks via virtlockd, while the sanlock.so to do the same via sanlock.
I think the first one is accurate. lockd.so is a plugin for daemons to communicate with virtlockd. Daniel wrote
"virtqemud locks(sic) the lockd.so plugin, as lockd.so provides the client impl to talk to virtlockd. Think of lockd.so as being equiv of libvirt.so".
I assume sanlock.so is the same. It provides the client impl for daemons to talk to virtlockd's sanlock backend. Regardless, suggestions on the actual text to put here would be much appreciated.
My understanding is that configuring the hypervisor driver to use sanlock results in it loading the sanlock.so plugin and calling out to sanlock directly, without going through virtlockd. virlockd is used when lockd.so is loaded. Basically the plugins provide the implementation of the locking interface, with the backend being sanlock and virtlockd respectively.
But I'm not 100% positive so let's wait for Dan to either confirm or debunk this take O:-)
Confirmed :-).
Assuming it's correct, the descriptions could be along the lines of
* libvirt-daemon-plugin-lockd This package provides the lockd.so module, a daemon plugin that implements disk locking using POSIX fcntl advisory locks via communication with the virtlockd daemon.
Sounds good.
* libvirt-daemon-plugin-sanlock This package provides the sanlock.so module, a daemon plugin that implements disk locking via communication with the sanlock daemon.
I missed that a description for the libvirt-lock-sanlock package already exists in this file. I'll update it in 5/9 and only include the libvirt-daemon-plugin-lockd addition here. Regards, Jim
participants (3)
-
Andrea Bolognani
-
Daniel P. Berrangé
-
Jim Fehlig