SHA256
1
0
forked from pool/libvirt

- spec: restart daemons in %posttrans after connection drivers

have been processed
  bsc#854343, bsc#968483

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=516
This commit is contained in:
James Fehlig 2016-03-18 20:47:21 +00:00 committed by Git OBS Bridge
parent 7405b879a5
commit 1c9f80bcb5
2 changed files with 25 additions and 3 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Mar 18 20:13:41 UTC 2016 - jfehlig@suse.com
- spec: restart daemons in %posttrans after connection drivers
have been processed
bsc#854343, bsc#968483
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 3 18:40:08 UTC 2016 - jfehlig@suse.com Thu Mar 3 18:40:08 UTC 2016 - jfehlig@suse.com

View File

@ -1434,9 +1434,13 @@ fi
%postun daemon %postun daemon
/sbin/ldconfig /sbin/ldconfig
%if %{with_systemd} %if %{with_systemd}
%service_del_postun libvirtd.service libvirtd.socket # On upgrade, defer restarting daemons until %posttrans
%service_del_postun virtlockd.service virtlockd.socket if test $1 -eq 0 ; then
%service_del_postun virtlogd.service virtlogd.socket for service in libvirtd virtlockd virtlogd ; do
rm -f "/var/lib/systemd/migrated/$service" 2> /dev/null || :
done
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%else %else
%restart_on_update libvirtd %restart_on_update libvirtd
%restart_on_update virtlockd %restart_on_update virtlockd
@ -1444,6 +1448,17 @@ fi
%endif %endif
%insserv_cleanup %insserv_cleanup
%posttrans daemon
# All connection drivers should be installed post transaction.
# Time to restart daemons.
%if %{with_systemd}
if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then
for service in libvirtd virtlockd virtlogd ; do
/usr/bin/systemctl try-restart ${service}.service >/dev/null 2>&1 || :
done
fi
%endif
# In upgrade scenario we must explicitly enable virtlockd/virtlogd # In upgrade scenario we must explicitly enable virtlockd/virtlogd
# sockets, if libvirtd is already enabled and start them if # sockets, if libvirtd is already enabled and start them if
# libvirtd is running, otherwise you'll get failures to start # libvirtd is running, otherwise you'll get failures to start