diff --git a/libvirt.changes b/libvirt.changes index 62fb0d0..1117a9d 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -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 diff --git a/libvirt.spec b/libvirt.spec index 0d175a2..1036327 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1434,9 +1434,13 @@ fi %postun daemon /sbin/ldconfig %if %{with_systemd} -%service_del_postun libvirtd.service libvirtd.socket -%service_del_postun virtlockd.service virtlockd.socket -%service_del_postun virtlogd.service virtlogd.socket +# On upgrade, defer restarting daemons until %posttrans +if test $1 -eq 0 ; then + 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 %restart_on_update libvirtd %restart_on_update virtlockd @@ -1444,6 +1448,17 @@ fi %endif %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 # sockets, if libvirtd is already enabled and start them if # libvirtd is running, otherwise you'll get failures to start