systemd: Add RemoveOnStop=yes to all sockets

Currently we only set this for the main sockets, which means
that

  $ systemctl stop virtqemud.socket

will make the socket disappear from the filesystem while

  $ systemctl stop virtqemud-ro.socket

won't. Get rid of this inconsistency.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Andrea Bolognani 2023-09-27 17:13:32 +02:00
parent 826931e95a
commit deda1a0791
8 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,7 @@ After=virtlockd.socket
ListenStream=@runstatedir@/libvirt/virtlockd-admin-sock
Service=virtlockd.service
SocketMode=0600
RemoveOnStop=yes
[Install]
WantedBy=sockets.target

View File

@ -5,6 +5,7 @@ Description=Virtual machine lock manager socket
ListenStream=@runstatedir@/libvirt/virtlockd-sock
Service=virtlockd.service
SocketMode=0600
RemoveOnStop=yes
[Install]
WantedBy=sockets.target

View File

@ -7,6 +7,7 @@ After=virtlogd.socket
ListenStream=@runstatedir@/libvirt/virtlogd-admin-sock
Service=virtlogd.service
SocketMode=0600
RemoveOnStop=yes
[Install]
WantedBy=sockets.target

View File

@ -5,6 +5,7 @@ Description=Virtual machine log manager socket
ListenStream=@runstatedir@/libvirt/virtlogd-sock
Service=virtlogd.service
SocketMode=0600
RemoveOnStop=yes
[Install]
WantedBy=sockets.target

View File

@ -7,6 +7,7 @@ After=libvirtd.socket
ListenStream=@runstatedir@/libvirt/libvirt-admin-sock
Service=libvirtd.service
SocketMode=0600
RemoveOnStop=yes
[Install]
WantedBy=sockets.target

View File

@ -7,6 +7,7 @@ After=libvirtd.socket
ListenStream=@runstatedir@/libvirt/libvirt-sock-ro
Service=libvirtd.service
SocketMode=0666
RemoveOnStop=yes
[Install]
WantedBy=sockets.target

View File

@ -9,6 +9,7 @@ After=libvirtd-admin.socket
ListenStream=@runstatedir@/libvirt/@sockprefix@-admin-sock
Service=@service@.service
SocketMode=0600
RemoveOnStop=yes
[Install]
WantedBy=sockets.target

View File

@ -9,6 +9,7 @@ After=libvirtd-ro.socket
ListenStream=@runstatedir@/libvirt/@sockprefix@-sock-ro
Service=@service@.service
SocketMode=0666
RemoveOnStop=yes
[Install]
WantedBy=sockets.target