[systemd-devel] systemd update "forgets" ordering for shutdown
Andrei Borzenkov
arvidjaar at gmail.com
Sat May 16 06:11:51 UTC 2020
15.05.2020 11:08, Frank Steiner пишет:
> 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.
>
Can you reproduce it by simply running "systemctl daemon-reexec" without
any package update? If it works, try "systemctl daemon-reexec" followed
by "systemctl daemon-reload". This will simplify reproducing of this issue.
> 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?
>
More information about the systemd-devel
mailing list