Currently "systemctl --fail --no-block default" will be executed on kdump-error-handler exit due to the config ExecStopPost. This may makes systemd try to isolate to the default target again, if both final_action or failure_action failed to terminates the system.
The execute chain will be like:
initrd.target -> kdump.sh (failed) -> kdump-error-handler.service -> failure_action -> final_action -> ExecStopPost (go to initrd.target again and loop infinitely)
Currently, reboot/shutdown/halt is guarenteen to be called by either by executing failure_action or final_action. So the loop will be stopped. However none of the reboot/shutdown/halt call is blocking so it might have race issue, and this ExecStopPost config is not useful after all.
Just drop the ExecStopPost to fix this potential issue. --- dracut-kdump-error-handler.service | 1 - 1 file changed, 1 deletion(-)
diff --git a/dracut-kdump-error-handler.service b/dracut-kdump-error-handler.service index 32b74ab..a23b75e 100644 --- a/dracut-kdump-error-handler.service +++ b/dracut-kdump-error-handler.service @@ -21,7 +21,6 @@ Environment=DRACUT_SYSTEMD=1 Environment=NEWROOT=/sysroot WorkingDirectory=/ ExecStart=/bin/kdump-error-handler.sh -ExecStopPost=-/usr/bin/systemctl --fail --no-block default Type=oneshot StandardInput=tty-force StandardOutput=inherit