Re: [libvirt PATCH 40/42] systemd: Drop BindTo/After between sockets

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

 



On Mon, Sep 25, 2023 at 08:58:38PM +0200, Andrea Bolognani wrote:
> They are unnecessary, since all sockets for a service are now
> enabled as soon as one of them is and each service has a very
> strong dependency on all of its sockets.

You earlier modified  the .service units to have BindsTo= for
each of the sockets it depends to.

Thus if any one of the .sockets is stopped, this means the
.service is stopped too.

The logic removed here though was doing a different job. That
said that that if $FOO.socket  is stopped, it would force stop
the $FOO-admin.socket and $FOO-ro.socket too.

IOW, it prevented having only the RO/admin sockets running,
without the primary socket.

I believe that's still needed

Also, you didn't add BindsTo on the libvirtd.service, because
that has to be able to run without socket activation for
upgrade scenarios. So we shouldn't be modifying the libvirtd
sockets anyway.

> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  src/locking/virtlockd-admin.socket.in | 2 --
>  src/logging/virtlogd-admin.socket.in  | 2 --
>  src/remote/libvirtd-admin.socket.in   | 2 --
>  src/remote/libvirtd-ro.socket.in      | 2 --
>  src/remote/libvirtd-tcp.socket.in     | 2 --
>  src/remote/libvirtd-tls.socket.in     | 2 --
>  src/virtd-admin.socket.in             | 2 --
>  src/virtd-ro.socket.in                | 2 --
>  src/virtd-tcp.socket.in               | 2 --
>  src/virtd-tls.socket.in               | 2 --
>  10 files changed, 20 deletions(-)
> 
> diff --git a/src/locking/virtlockd-admin.socket.in b/src/locking/virtlockd-admin.socket.in
> index 63f78a02da..a773b511bd 100644
> --- a/src/locking/virtlockd-admin.socket.in
> +++ b/src/locking/virtlockd-admin.socket.in
> @@ -1,7 +1,5 @@
>  [Unit]
>  Description=Virtual machine lock manager admin socket
> -BindsTo=virtlockd.socket
> -After=virtlockd.socket
>  
>  [Socket]
>  ListenStream=@runstatedir@/libvirt/virtlockd-admin-sock
> diff --git a/src/logging/virtlogd-admin.socket.in b/src/logging/virtlogd-admin.socket.in
> index 1d18fe6f56..e0d35cbcf3 100644
> --- a/src/logging/virtlogd-admin.socket.in
> +++ b/src/logging/virtlogd-admin.socket.in
> @@ -1,7 +1,5 @@
>  [Unit]
>  Description=Virtual machine log manager socket
> -BindsTo=virtlogd.socket
> -After=virtlogd.socket
>  
>  [Socket]
>  ListenStream=@runstatedir@/libvirt/virtlogd-admin-sock
> diff --git a/src/remote/libvirtd-admin.socket.in b/src/remote/libvirtd-admin.socket.in
> index 6df038d95a..ba060eaea4 100644
> --- a/src/remote/libvirtd-admin.socket.in
> +++ b/src/remote/libvirtd-admin.socket.in
> @@ -1,7 +1,5 @@
>  [Unit]
>  Description=@name@ admin socket
> -BindsTo=libvirtd.socket
> -After=libvirtd.socket
>  
>  [Socket]
>  ListenStream=@runstatedir@/libvirt/libvirt-admin-sock
> diff --git a/src/remote/libvirtd-ro.socket.in b/src/remote/libvirtd-ro.socket.in
> index 6797517c50..d2ab7ba4f2 100644
> --- a/src/remote/libvirtd-ro.socket.in
> +++ b/src/remote/libvirtd-ro.socket.in
> @@ -1,7 +1,5 @@
>  [Unit]
>  Description=@name@ local read-only socket
> -BindsTo=libvirtd.socket
> -After=libvirtd.socket
>  
>  [Socket]
>  ListenStream=@runstatedir@/libvirt/libvirt-sock-ro
> diff --git a/src/remote/libvirtd-tcp.socket.in b/src/remote/libvirtd-tcp.socket.in
> index 8b8fbcd01a..e32daddf25 100644
> --- a/src/remote/libvirtd-tcp.socket.in
> +++ b/src/remote/libvirtd-tcp.socket.in
> @@ -1,7 +1,5 @@
>  [Unit]
>  Description=@name@ non-TLS IP socket
> -BindsTo=libvirtd.socket
> -After=libvirtd.socket
>  
>  [Socket]
>  ListenStream=16509
> diff --git a/src/remote/libvirtd-tls.socket.in b/src/remote/libvirtd-tls.socket.in
> index fefda22c6b..2f34e8e0cd 100644
> --- a/src/remote/libvirtd-tls.socket.in
> +++ b/src/remote/libvirtd-tls.socket.in
> @@ -1,7 +1,5 @@
>  [Unit]
>  Description=@name@ TLS IP socket
> -BindsTo=libvirtd.socket
> -After=libvirtd.socket
>  
>  [Socket]
>  ListenStream=16514
> diff --git a/src/virtd-admin.socket.in b/src/virtd-admin.socket.in
> index a4faeb7da8..dc2cb737ce 100644
> --- a/src/virtd-admin.socket.in
> +++ b/src/virtd-admin.socket.in
> @@ -1,7 +1,5 @@
>  [Unit]
>  Description=@name@ admin socket
> -BindsTo=@service@.socket
> -After=@service@.socket
>  Conflicts=libvirtd-admin.socket
>  After=libvirtd-admin.socket
>  @socket_unit_extra@
> diff --git a/src/virtd-ro.socket.in b/src/virtd-ro.socket.in
> index 829c2e8b1f..ef1716e3f3 100644
> --- a/src/virtd-ro.socket.in
> +++ b/src/virtd-ro.socket.in
> @@ -1,7 +1,5 @@
>  [Unit]
>  Description=@name@ local read-only socket
> -BindsTo=@service@.socket
> -After=@service@.socket
>  Conflicts=libvirtd-ro.socket
>  After=libvirtd-ro.socket
>  @socket_unit_extra@
> diff --git a/src/virtd-tcp.socket.in b/src/virtd-tcp.socket.in
> index 2873c35135..26ead32789 100644
> --- a/src/virtd-tcp.socket.in
> +++ b/src/virtd-tcp.socket.in
> @@ -1,7 +1,5 @@
>  [Unit]
>  Description=@name@ non-TLS IP socket
> -BindsTo=@service@.socket
> -After=@service@.socket
>  Conflicts=libvirtd-tcp.socket
>  After=libvirtd-tcp.socket
>  @socket_unit_extra@
> diff --git a/src/virtd-tls.socket.in b/src/virtd-tls.socket.in
> index 2d4d589c8a..47da9317d6 100644
> --- a/src/virtd-tls.socket.in
> +++ b/src/virtd-tls.socket.in
> @@ -1,7 +1,5 @@
>  [Unit]
>  Description=@name@ TLS IP socket
> -BindsTo=@service@.socket
> -After=@service@.socket
>  Conflicts=libvirt-tls.socket
>  After=libvirt-tls.socket
>  @socket_unit_extra@
> -- 
> 2.41.0
> 

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




[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