[PATCH] spec: Restart libvirtd on upgrade without socket activation

Martin Kletzander posted 1 patch 1 year, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/a1d836314db600aafa56d4ce9203d3219da54ab5.1673360814.git.mkletzan@redhat.com
libvirt.spec.in | 1 +
1 file changed, 1 insertion(+)
[PATCH] spec: Restart libvirtd on upgrade without socket activation
Posted by Martin Kletzander 1 year, 8 months ago
The %posttrans phase needs has a special case for upgrading libvirt
daemon with --listen, but it forgot to also restart the daemon in order
to run the new installed version.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1820437

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
 libvirt.spec.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index d9529fc76c4a..77b274b6f91d 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1449,6 +1449,7 @@ then
                 libvirtd-admin.socket \
                 libvirtd-tls.socket \
                 libvirtd-tcp.socket >/dev/null 2>&1 || :
+        /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
     else
         # Old libvirtd owns the sockets and will delete them on
         # shutdown. Can't use a try-restart as libvirtd will simply
-- 
2.39.0
Re: [PATCH] spec: Restart libvirtd on upgrade without socket activation
Posted by Jiri Denemark 1 year, 8 months ago
On Tue, Jan 10, 2023 at 15:26:54 +0100, Martin Kletzander wrote:
> The %posttrans phase needs has a special case for upgrading libvirt

s/needs //

> daemon with --listen, but it forgot to also restart the daemon in order
> to run the new installed version.
> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1820437
> 
> Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
> ---
>  libvirt.spec.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index d9529fc76c4a..77b274b6f91d 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -1449,6 +1449,7 @@ then
>                  libvirtd-admin.socket \
>                  libvirtd-tls.socket \
>                  libvirtd-tcp.socket >/dev/null 2>&1 || :
> +        /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
>      else
>          # Old libvirtd owns the sockets and will delete them on
>          # shutdown. Can't use a try-restart as libvirtd will simply

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Re: [PATCH] spec: Restart libvirtd on upgrade without socket activation
Posted by Ján Tomko 1 year, 8 months ago
On a Tuesday in 2023, Martin Kletzander wrote:
>The %posttrans phase needs has a special case for upgrading libvirt
>daemon with --listen, but it forgot to also restart the daemon in order
>to run the new installed version.
>
>Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1820437
>
>Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
>---
> libvirt.spec.in | 1 +
> 1 file changed, 1 insertion(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano