[systemd-devel] Restart and RestartSec in packaged .service files

"Jóhann B. Guðmundsson" johannbg at gmail.com
Thu Sep 1 09:03:14 PDT 2011


On 09/01/2011 02:13 PM, Lennart Poettering wrote:
> We currently store information about crashes in syslog, which is however
> not really that helpful.
>
> I do believe however that we really need to work towards the direction
> that we can auto-respawn services where this makes sense by default and
> have a nice way to store away informatoin about the failure, so that
> this is not lost.

I do believe the proper saner result would be defaulting to on-failure 
instead and distro's be left up to add to their unit files where 
applicable auto-respawn on servers it's really not what you want.

Now there are two reasons we admins need to restart services

1) Because it failed or is left in some
And we already have in place restart on failure to handle that

2) Because we made some configuration changes

Path units can be used to handle that which is why I filed that RFE  to 
extend it a bit then we would not even have to bother with restarting 
the service ourself or write some script to do that if that 
configuration file was synced/pushed/pulled over the network or changed 
locally

I would think that all systemd would have to do would be to log the 
action, flag it failure or path change/restarted by user or another 
unit  with timestamps to something like /var/log/systemd.log which other 
( logger ) tools could be used to parse that log and have the ability to 
notify some external system with that same information.

Crashes themselves should really be handle by something like abrt which 
then could forward the crashdump to distro's bugzilla's ( or something 
internal ).

Timer units along with check units ( having native check units which 
would connect to service ports/sockets would be really nice  )  can 
monitor those daemons and restart the service if it does not respond ( 
sometimes daemons end up in inconsistent state as in they might still be 
running but do not respond to request I'm pretty sure systemd does not 
detect that ).

JBG




More information about the systemd-devel mailing list