Re: [libvirt PATCH 5/8] rpm: Remove custom libvirtd restart logic

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

 



On Fri, Jul 14, 2023 at 04:39:39PM +0200, Andrea Bolognani wrote:
> This logic was necessary when socket activation was introduced
> in libvirt 5.6.0/5.7.0 in order to guarantee smooth upgrades.
> 
> These days, even the oldest platform that we target ships a
> version of libvirtd that implements socket activation, so the
> additional code is no longer useful and we can treat libvirtd
> the same as all other services.

The upgrade path though can come from a platform that we
don't support, but we do support upgrade from.

eg we don't support RHEL-8, but upgrades from 8 -> 9 are
supported. I think it is premature to declare this upgrade
code no longer useful.

> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  libvirt.spec.in | 34 +---------------------------------
>  1 file changed, 1 insertion(+), 33 deletions(-)
> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index c9317ed0cc..d09c3b3340 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -1492,39 +1492,7 @@ fi \
>  
>  %posttrans daemon
>  %libvirt_sysconfig_posttrans libvirtd
> -if test %libvirt_daemon_needs_restart libvirtd
> -then
> -    # See if user has previously modified their install to
> -    # tell libvirtd to use --listen
> -    grep -E '^LIBVIRTD_ARGS=.*--listen' /etc/sysconfig/libvirtd 1>/dev/null 2>&1
> -    if test $? = 0
> -    then
> -        # Then lets keep honouring --listen and *not* use
> -        # systemd socket activation, because switching things
> -        # might confuse mgmt tool like puppet/ansible that
> -        # expect the old style libvirtd
> -        /bin/systemctl mask \
> -                libvirtd.socket \
> -                libvirtd-ro.socket \
> -                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
> -        # own the sockets again when it comes back up. Thus we must
> -        # do this particular ordering, so that we get libvirtd
> -        # running with socket activation in use
> -        /bin/systemctl stop libvirtd.service >/dev/null 2>&1 || :
> -        /bin/systemctl try-restart \
> -                libvirtd.socket \
> -                libvirtd-ro.socket \
> -                libvirtd-admin.socket >/dev/null 2>&1 || :
> -        /bin/systemctl start libvirtd.service >/dev/null 2>&1 || :
> -    fi
> -fi
> -%libvirt_daemon_finish_restart libvirtd
> +%libvirt_daemon_perform_restart libvirtd
>  
>  %preun daemon
>  %libvirt_daemon_systemd_preun_inet libvirtd
> -- 
> 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