[systemd-devel] systemd update "forgets" ordering for shutdown

Frank Steiner fsteiner-mail1 at bio.ifi.lmu.de
Fri May 15 08:08:51 UTC 2020


Hi,

I need to run a script on shutdown before any other service is stopped.
Due to an advice Lennart gave a while ago I'm using this service file
(with multi-user.target being our default runlevel target):

[Unit]
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/bin/true
ExecStop=/usr/lib/systemd/scripts/halt.local.bio
TimeoutSec=120
RemainAfterExit=yes

This works fine and the script indeed runs before anything else goes down.
But: not always! But somtimes it happens that the ordering is forgotten
and this script is stopped together with and/or after many others.
Sometimes the halt.local.bio script is still running even after
remote and local fs are going down.

By chance I was able to figure out that updating the systemd.rpm
causes this problems. It is reproducible by reinstalling the
currently installed systemd with "rpm -Uhv --force ...".
I can reboot the host 5 times in a row with the script working
fine, then I reinstall systemd and reboot => ordering fails.
Calling "systemctl daemon-reload" right before reboot doesn't help.

systemd is 234-24.49.2, that's the version currently provided for
SuSE Linux Enterprise 15 SP1.

Is this a known bug maybe fixed in some later version so that I
could ask SuSE to add the patch?

cu,
Frank
-- 
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *


More information about the systemd-devel mailing list