[systemd-devel] [RFC PATCH] service: add Restart option to execute StartLimitAction immediately
Lennart Poettering
lennart at poettering.net
Mon Mar 24 12:30:09 PDT 2014
On Thu, 20.03.14 12:52, Michael Olbrich (m.olbrich at pengutronix.de) wrote:
> The idea is to reboot immediately when a service crashes or the watchdog
> triggers. This is useful in embedded scenarios when there is only one
> important service. There are use-cases where rebooting immediately instead
> of trying to restart the application first makes sense.
> The environment of the restarted application is not well defined. The
> watchdog is for unexpected failures. So making sure that the application
> behaves correctly can be difficult. When rebooting only takes a few
> seconds, doing so may be more robust than trying to recover from an
> undefined state.
>
> This is an RFC for now. Mostly because I think the configuration is rather
> awkward like this.
> Hooking into Restart/StartLimitAction was the easiest way to handle this in
> the code. But it doesn't feel natural to configure it like this. Any Ideas
> on how to express this in the unit file?
Sounds useful, but I think it would be better to generalize the "action"
concept and then expose FailureAction= in addition to
StartLimitAction=.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list