[systemd-devel] Support for pre-restart check

"Jóhann B. Guðmundsson" johannbg at gmail.com
Thu Jul 31 01:58:00 PDT 2014


On 07/31/2014 12:41 AM, Michael Biebl wrote:
> 2014-07-30 14:34 GMT+02:00 Reindl Harald <h.reindl at thelounge.net>:
>> "ExecStopPre" would be better suited as the pre-restart check because
>> it would achieve the goal and also prevent stop a service until it's
>> configuration is fixed - that catchs cases where you stop something
>> for whatever reason and expect it would be started at the next boot
> I don't think that would be a wise thing to do.
> If I want to reboot my system, it shouldn't fail to reboot because of
> a buggy apache configuration.
> Apache should shutdown and simply fail to start on next reboot.
>
>
>

Right the solution to this cannot interfere with normal starting and 
shutdown and wont be solve with introducing yet another Exec* line in 
one form or another.

What is needed to solve this problem ( as in to reliably restart an 
application ) as far as I can tell is to introduce something like pre 
restart check which tries to start another instance of the service in an 
isolated application container, returns true if successful, is enabled 
per service, perhaps could be extended per container as well and only 
executed when systemctl restart/reload ( or implemented in try-restart ) 
$foo is run.

Providing patches for anything less then what I mention here above is a 
waste of time from my point of view since it wont solve the underlying 
problem.

JBG



More information about the systemd-devel mailing list