[systemd-devel] Restart=on-failure and SuccessAction=reboot-force causing reboots on every exit of Main PID

Michał Rudowicz michal.rudowicz at fl9.eu
Thu Feb 17 09:47:00 UTC 2022


Hi,

The minimal file with which I was able to reproduce the issue is:

    [Unit]
    Description="Example"
    SuccessAction=reboot-force

    [Service]
    Type=simple
    ExecStart=/bin/false
    Restart=on-failure

I can reproduce it both on my buildroot system with systemd 247 and fresh
Fedora 35 minimal install with v249.9-1.fc35 .

After commenting out "Restart=on-failure" the reboots are not happening,
and the service is "failed" as expected.
Commenting out "SuccessAction=reboot-force" but leaving "Restart=on-failure"
not commented causes the service to restart without a system reboot, as
expected.

Michał


More information about the systemd-devel mailing list