Re: [PATCH V8 10/13] spec: Remove libvirt-daemon dependency from primary drivers

2023-01-13 Thread Jim Fehlig

On 1/13/23 10:05, Andrea Bolognani wrote:

On Wed, Jan 11, 2023 at 03:05:57PM -0700, Jim Fehlig wrote:

Change the dependency to a 'Wants' to avoid a pacakge


*package


+++ b/libvirt.spec.in
@@ -775,7 +776,8 @@ 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-daemon-log = %{version}-%{release}


Does the lxc driver actually use virtlogd by default in the same way
the qemu driver does?


AFAICT, no, it does not. I don't recall what got me to thinking it was needed...


If so, we need a Requires=virtlogd.socket in
the corresponding unit file, and also libvirt-daemon-lxc needs to
Require: libvirt-daemon-log by the end of the series.


+++ b/src/libxl/virtxend.service.in
@@ -1,10 +1,10 @@
  [Unit]
  Description=Virtualization xen daemon
  Conflicts=libvirtd.service
-Requires=virtlockd.socket
  Requires=virtxend.socket
  Requires=virtxend-ro.socket
  Requires=virtxend-admin.socket
+Wants=virtlockd.socket

[...]

+++ b/src/qemu/virtqemud.service.in
@@ -2,10 +2,10 @@
  Description=Virtualization qemu daemon
  Conflicts=libvirtd.service
  Requires=virtlogd.socket
-Requires=virtlockd.socket
  Requires=virtqemud.socket
  Requires=virtqemud-ro.socket
  Requires=virtqemud-admin.socket
+Wants=virtlockd.socket


I would make these changes in a separate preparatory patch, and
modify libvirtd.service in the same way at that time.


Ok, will do in V9.

Regards,
Jim



Re: [PATCH V8 10/13] spec: Remove libvirt-daemon dependency from primary drivers

2023-01-13 Thread Andrea Bolognani
On Fri, Jan 13, 2023 at 07:05:36PM +0200, Andrea Bolognani wrote:
> Overall things look good. Let me actually test this a bit :)

Some quick testing (QEMU only) revealed no issues.

So I just need you to clarify the lxc virtlogd bit above and weigh in
on the other nits I mentioned, but otherwise I think we're good to go
once 9.0.0 is out :)

-- 
Andrea Bolognani / Red Hat / Virtualization



Re: [PATCH V8 10/13] spec: Remove libvirt-daemon dependency from primary drivers

2023-01-13 Thread Andrea Bolognani
On Wed, Jan 11, 2023 at 03:05:57PM -0700, Jim Fehlig wrote:
> Change the dependency to a 'Wants' to avoid a pacakge

*package

> +++ b/libvirt.spec.in
> @@ -775,7 +776,8 @@ 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-daemon-log = %{version}-%{release}

Does the lxc driver actually use virtlogd by default in the same way
the qemu driver does? If so, we need a Requires=virtlogd.socket in
the corresponding unit file, and also libvirt-daemon-lxc needs to
Require: libvirt-daemon-log by the end of the series.

> +++ b/src/libxl/virtxend.service.in
> @@ -1,10 +1,10 @@
>  [Unit]
>  Description=Virtualization xen daemon
>  Conflicts=libvirtd.service
> -Requires=virtlockd.socket
>  Requires=virtxend.socket
>  Requires=virtxend-ro.socket
>  Requires=virtxend-admin.socket
> +Wants=virtlockd.socket
[...]
> +++ b/src/qemu/virtqemud.service.in
> @@ -2,10 +2,10 @@
>  Description=Virtualization qemu daemon
>  Conflicts=libvirtd.service
>  Requires=virtlogd.socket
> -Requires=virtlockd.socket
>  Requires=virtqemud.socket
>  Requires=virtqemud-ro.socket
>  Requires=virtqemud-admin.socket
> +Wants=virtlockd.socket

I would make these changes in a separate preparatory patch, and
modify libvirtd.service in the same way at that time.

It's true that you'll never not have virtlockd available if the
monolithic daemon is present, but still it's preferable to keep
things consistent.


Overall things look good. Let me actually test this a bit :)

-- 
Andrea Bolognani / Red Hat / Virtualization



[PATCH V8 10/13] spec: Remove libvirt-daemon dependency from primary drivers

2023-01-11 Thread Jim Fehlig
To avoid needlessly installing the monolithic daemon, replace the
libvirt-daemon dependency with libvirt-daemon-common in the primary
drivers.

The qemu and libxl drivers need additional adjustment to break the
dependency on libvirt-daemon. The virtqemud systemd service file
has a hard dependency on virtlogd, hence libvirt-daemon-driver-qemu
must depend on libvirt-daemon-log. The systemd service files of both
drivers currently have a 'Requires' dependency on virtlockd, which
is too strong since virtlockd is not enabled by default in either
driver. Change the dependency to a 'Wants' to avoid a pacakge
dependency between libvirt-daemon-driver-{libxl,qemu} and
libvirt-daemon-lock.

Signed-off-by: Jim Fehlig 
---
 libvirt.spec.in   | 10 ++
 src/libxl/virtxend.service.in |  2 +-
 src/qemu/virtqemud.service.in |  2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 4c39555ca9..fb318ad599 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -749,7 +749,8 @@ 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-daemon-log = %{version}-%{release}
 Requires: libvirt-libs = %{version}-%{release}
 Requires: /usr/bin/qemu-img
 # For image compression
@@ -775,7 +776,8 @@ 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-daemon-log = %{version}-%{release}
 Requires: libvirt-libs = %{version}-%{release}
 # There really is a hard cross-driver dependency here
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
@@ -795,7 +797,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
@@ -807,7 +809,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
 
diff --git a/src/libxl/virtxend.service.in b/src/libxl/virtxend.service.in
index 6b083c414f..9171d4fdf8 100644
--- a/src/libxl/virtxend.service.in
+++ b/src/libxl/virtxend.service.in
@@ -1,10 +1,10 @@
 [Unit]
 Description=Virtualization xen daemon
 Conflicts=libvirtd.service
-Requires=virtlockd.socket
 Requires=virtxend.socket
 Requires=virtxend-ro.socket
 Requires=virtxend-admin.socket
+Wants=virtlockd.socket
 After=network.target
 After=dbus.service
 After=apparmor.service
diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in
index 9ae3f01fa0..315359e287 100644
--- a/src/qemu/virtqemud.service.in
+++ b/src/qemu/virtqemud.service.in
@@ -2,10 +2,10 @@
 Description=Virtualization qemu daemon
 Conflicts=libvirtd.service
 Requires=virtlogd.socket
-Requires=virtlockd.socket
 Requires=virtqemud.socket
 Requires=virtqemud-ro.socket
 Requires=virtqemud-admin.socket
+Wants=virtlockd.socket
 Wants=systemd-machined.service
 After=network.target
 After=dbus.service
-- 
2.38.1