libvirt-guests has After= dependency for all the sockets and that is enough.
With the extra Before= in the service file systemd postpones the start of the
socket activated service (when libvirt-guests is trying to connect to the
socket) until after libvirt-guests is stopped effectively making `systemctl stop
libvirt-guests` deadlock. The reason for that is that all stop jobs are
scheduled before any start job. Removing the redundant Before= specification
fixes this behaviour.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1964855
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/ch/virtchd.service.in | 1 -
src/lxc/virtlxcd.service.in | 1 -
src/qemu/virtqemud.service.in | 1 -
src/remote/libvirtd.service.in | 1 -
4 files changed, 4 deletions(-)
diff --git a/src/ch/virtchd.service.in b/src/ch/virtchd.service.in
index f53a12ea056c..8c22b02c9e70 100644
--- a/src/ch/virtchd.service.in
+++ b/src/ch/virtchd.service.in
@@ -5,7 +5,6 @@ Requires=virtchd.socket
Requires=virtchd-ro.socket
Requires=virtchd-admin.socket
Wants=systemd-machined.service
-Before=libvirt-guests.service
After=network.target
After=dbus.service
After=apparmor.service
diff --git a/src/lxc/virtlxcd.service.in b/src/lxc/virtlxcd.service.in
index 334c34db4413..9946db946219 100644
--- a/src/lxc/virtlxcd.service.in
+++ b/src/lxc/virtlxcd.service.in
@@ -5,7 +5,6 @@ Requires=virtlxcd.socket
Requires=virtlxcd-ro.socket
Requires=virtlxcd-admin.socket
Wants=systemd-machined.service
-Before=libvirt-guests.service
After=network.target
After=dbus.service
After=apparmor.service
diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in
index 5ad968ace92a..9ae3f01fa099 100644
--- a/src/qemu/virtqemud.service.in
+++ b/src/qemu/virtqemud.service.in
@@ -7,7 +7,6 @@ Requires=virtqemud.socket
Requires=virtqemud-ro.socket
Requires=virtqemud-admin.socket
Wants=systemd-machined.service
-Before=libvirt-guests.service
After=network.target
After=dbus.service
After=apparmor.service
diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
index 5d4d412fccb8..954df5d1e5cc 100644
--- a/src/remote/libvirtd.service.in
+++ b/src/remote/libvirtd.service.in
@@ -9,7 +9,6 @@ Wants=libvirtd.socket
Wants=libvirtd-ro.socket
Wants=libvirtd-admin.socket
Wants=systemd-machined.service
-Before=libvirt-guests.service
After=network.target
After=firewalld.service
After=iptables.service
--
2.38.1