Why can't ExecStopPre= be used to abort stopping a (broken) service?

"Jóhann B. Guðmundsson" johannbg at gmail.com
Mon Jul 15 22:44:26 UTC 2013


On 07/15/2013 10:15 PM, Paul Wouters wrote:
>> The correct way here is to stay true to what is tried and tested in 
>> the legacy sysv init scripts and add the config parser to the 
>> ExecStartPre= line in the unit file.
>
> I have that now, but it still causing the service to terminate after a
> "restart", which I think is less desirable than running with the old
> config. But again, with the option there, people can choose what they
> prefer. 

Indeed but I was thinking more distro wide as in enabling this by 
default ( which makes sense if we add this ) for those service/daemon 
that support config parsing followed by Restart=on-failure which would 
deliver 99.9% uptime of the service/daemon. ( the only down time being 
when the admin shutdowns the service or it being restarted during 
updates ) but here is just that problem if notifying the admin of the 
parsing error..

You might actually be able to hack your self around this via double 
ExecStop= lines one with the conf parser followed by the actual 
daemon/service ExecStop line.

I guess if we are going to support ExecRestartPre= we need to also add 
ExecReloadPre= and arguably if we do add this we should update the units 
for the reason I mention here above.

JBG


More information about the devel mailing list