diff --git a/slurm.changes b/slurm.changes index 6ee11b0..384dd64 100644 --- a/slurm.changes +++ b/slurm.changes @@ -1,11 +1,20 @@ +------------------------------------------------------------------- +Wed Apr 11 11:27:31 UTC 2018 - eich@suse.com + +- Make sure systemd services get restarted only when all + packages are in a consistent state, not in the middle + of an 'update' transaction (bsc#1088693). + Since the %postun scripts that run on update are from + the old package they cannot be changed - thus we work + around the restart breakage. + ------------------------------------------------------------------- Fri Mar 23 13:50:14 UTC 2018 - cgoll@suse.com - fixed wrong log file location in slurmdbd.conf and fixed pid location for slurmdbd and made slurm-slurmdbd depend on slurm config which provides the dir /var/run/slurm - (bsc#1086859) - + (bsc#1086859). ------------------------------------------------------------------- Fri Mar 16 08:57:20 UTC 2018 - cgoll@suse.com diff --git a/slurm.spec b/slurm.spec index 005535a..b3c740a 100644 --- a/slurm.spec +++ b/slurm.spec @@ -467,7 +467,7 @@ EOF %postun %if 0%{?with_systemd} -%service_del_postun slurmctld.service +%service_del_postun -n slurmctld.service %else %insserv_cleanup %endif @@ -493,7 +493,7 @@ EOF %postun slurmdbd %if 0%{?with_systemd} -%service_del_postun slurmdbd.service +%service_del_postun -n slurmdbd.service %else %restart_on_update slurmdbd %insserv_cleanup @@ -518,7 +518,7 @@ EOF %postun node %if 0%{?with_systemd} -%service_del_postun slurmd.service +%service_del_postun -n slurmd.service %else %restart_on_update slurmd %insserv_cleanup @@ -546,6 +546,37 @@ exit 0 %post -n libpmi%{pmi_so} -p /sbin/ldconfig %postun -n libpmi%{pmi_so} -p /sbin/ldconfig +# On update the %%postun code of the old package restarts the +# service. This breaks in case the ABI between slurm and its +# plugins has changed as updates are not atomic. Since we cannot +# fix the old scripts we need these macros as a workaround. +# They should be removed at some point. +%define _test_rest() %{?with_systemd:rm -f /run/%{1}.rst; systemctl status %{1} &>/dev/null && touch /run/%{1}.rst || :;} +%define _rest() %{?with_systemd:[ -e /run/%{1}.rst ] && { systemctl status %{1} &>/dev/null || systemctl restart %{1}; }; rm -f /run/%{1}.rst;} +# Until a posttrans macro has been added to macros.systemd, we need this +%define _res_update() %{?with_systemd:%{expand:%%_restart_on_update %{?*}};} + +%pretrans +%_test_rest slurmctld + +%pretrans node +%_test_rest slurmd + +%pretrans slurmdbd +%_test_rest slurmdbd + +%posttrans +%_res_update slurmctld +%_rest slurmctld + +%posttrans node +%_res_update slurmd +%_rest slurmd + +%posttrans slurmdbd +%_res_update slurmdbd.service +%_rest slurmdbd + %files %defattr(-,root,root) %doc AUTHORS NEWS RELEASE_NOTES DISCLAIMER COPYING