forked from pool/slurm
- 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. (bsc#1086859). OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=51
This commit is contained in:
parent
7025591d0d
commit
7dbbe8e89d
@ -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
|
Fri Mar 23 13:50:14 UTC 2018 - cgoll@suse.com
|
||||||
|
|
||||||
- fixed wrong log file location in slurmdbd.conf and
|
- fixed wrong log file location in slurmdbd.conf and
|
||||||
fixed pid location for slurmdbd and made slurm-slurmdbd
|
fixed pid location for slurmdbd and made slurm-slurmdbd
|
||||||
depend on slurm config which provides the dir /var/run/slurm
|
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
|
Fri Mar 16 08:57:20 UTC 2018 - cgoll@suse.com
|
||||||
|
37
slurm.spec
37
slurm.spec
@ -467,7 +467,7 @@ EOF
|
|||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
%service_del_postun slurmctld.service
|
%service_del_postun -n slurmctld.service
|
||||||
%else
|
%else
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
%endif
|
%endif
|
||||||
@ -493,7 +493,7 @@ EOF
|
|||||||
|
|
||||||
%postun slurmdbd
|
%postun slurmdbd
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
%service_del_postun slurmdbd.service
|
%service_del_postun -n slurmdbd.service
|
||||||
%else
|
%else
|
||||||
%restart_on_update slurmdbd
|
%restart_on_update slurmdbd
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
@ -518,7 +518,7 @@ EOF
|
|||||||
|
|
||||||
%postun node
|
%postun node
|
||||||
%if 0%{?with_systemd}
|
%if 0%{?with_systemd}
|
||||||
%service_del_postun slurmd.service
|
%service_del_postun -n slurmd.service
|
||||||
%else
|
%else
|
||||||
%restart_on_update slurmd
|
%restart_on_update slurmd
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
@ -546,6 +546,37 @@ exit 0
|
|||||||
%post -n libpmi%{pmi_so} -p /sbin/ldconfig
|
%post -n libpmi%{pmi_so} -p /sbin/ldconfig
|
||||||
%postun -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
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc AUTHORS NEWS RELEASE_NOTES DISCLAIMER COPYING
|
%doc AUTHORS NEWS RELEASE_NOTES DISCLAIMER COPYING
|
||||||
|
Loading…
Reference in New Issue
Block a user