mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
rpm: Remove custom libvirtd restart logic
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. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
ea45933d35
commit
df1e4e34cc
@ -1492,39 +1492,7 @@ fi \
|
|||||||
|
|
||||||
%posttrans daemon
|
%posttrans daemon
|
||||||
%libvirt_sysconfig_posttrans libvirtd
|
%libvirt_sysconfig_posttrans libvirtd
|
||||||
if test %libvirt_daemon_needs_restart libvirtd
|
%libvirt_daemon_perform_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
|
|
||||||
|
|
||||||
%preun daemon
|
%preun daemon
|
||||||
%libvirt_daemon_systemd_preun_inet libvirtd
|
%libvirt_daemon_systemd_preun_inet libvirtd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user