[PATCH 01/23] locking, logging: put a strong dep from admin socket to main socket

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

 



It doesn't make sense to have the admin socket active if the main
socket is not running, so bind their lifecycle together.

This ensures that if primary socket is stopped, the corresponding
admin socket is also stopped.

In the reverse, starting the admin socket will also automatically
start the primary socket.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/locking/virtlockd-admin.socket.in | 2 ++
 src/logging/virtlogd-admin.socket.in  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/locking/virtlockd-admin.socket.in b/src/locking/virtlockd-admin.socket.in
index f674c492f7..cd7072238c 100644
--- a/src/locking/virtlockd-admin.socket.in
+++ b/src/locking/virtlockd-admin.socket.in
@@ -1,6 +1,8 @@
 [Unit]
 Description=Virtual machine lock manager admin socket
 Before=libvirtd.service
+BindsTo=virtlockd.socket
+After=virtlockd.socket
 
 [Socket]
 ListenStream=@localstatedir@/run/libvirt/virtlockd-admin-sock
diff --git a/src/logging/virtlogd-admin.socket.in b/src/logging/virtlogd-admin.socket.in
index 5c41dfeb7b..672bd7470d 100644
--- a/src/logging/virtlogd-admin.socket.in
+++ b/src/logging/virtlogd-admin.socket.in
@@ -1,6 +1,8 @@
 [Unit]
 Description=Virtual machine log manager socket
 Before=libvirtd.service
+BindsTo=virtlogd.socket
+After=virtlogd.socket
 
 [Socket]
 ListenStream=@localstatedir@/run/libvirt/virtlogd-admin-sock
-- 
2.21.0

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

  Powered by Linux