3 ms·
In a way, I'm not surprised... when I reboot my systemd-based servers, it almost seems like (based on speed) that it didn't do anything to the running services
by nubinetwork 2y ago
In a way, I'm not surprised... when I reboot my systemd-based servers, it almost seems like (based on speed) that it didn't do anything to the running services and filesystems, and just tells the kernel to immediately reboot.
- zokier 2y agoWhy guess when the shutdown(/reboot) process is explicitly documented: > Shortly before executing the actual system power-off/halt/reboot/kexec systemd-shutdown will run all executables in /usr/lib/systemd/system-shutdown/ and pass one arguments to them: either "poweroff", "halt", "reboot", or "kexec", depending on the chosen action. All executables in this directory are executed in parallel, and execution of the action is not continued before all executables finished. Note that these executables are run after all services have been shut down, and after most mounts have been unmounted (the root file system as well as /run/ and various API file systems are still around though). https://www.freedesktop.org/software/systemd/man/devel/systemd-poweroff.service.html https://www.freedesktop.org/software/systemd/man/devel/syste...
- b112 2y agoYup. And unlike sysvinit Debian systems I run (hundreds under bookworm), systemd init systems (I run thousands) require all sorts of workarounds for this sort of behaviour. I get VMs not rebooting due to NFS umount failures, VMs not logging shutdown info because rsyslogd is terminated too early, literally endless issues. Killing services without a proper TERM and wait prior to -9 is only one of the wonderful shortcomings I find with systemd.
- zokier 2y agoTERM, wait, KILL is exactly what systemd does by default, and it's again configurable (and documented): > If no ExecStop= commands are specified, the service gets the SIGTERM immediately. This default behavior can be changed by the TimeoutStopFailureMode= option. Second, it configures the time to wait for the service itself to stop. If it doesn't terminate in the specified time, it will be forcibly terminated by SIGKILL (see KillMode= in systemd.kill(5)). https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#TimeoutStopSec= https://www.freedesktop.org/software/systemd/man/latest/syst... https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#KillMode= https://www.freedesktop.org/software/systemd/man/latest/syst...