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

"Jóhann B. Guðmundsson" johannbg at gmail.com
Thu Sep 1 04:53:23 PDT 2011


On 09/01/2011 11:07 AM, Reindl Harald wrote:
>
> Am 01.09.2011 12:48, schrieb "Jóhann B. Guðmundsson":
>> On 09/01/2011 09:42 AM, Reindl Harald wrote:
>>> yes and that is why "systemd" should generate a notify-mail to root as
>>> self-written scripts are doing since years so they could be really
>>> replaced with systemd - the silent restart is a unfinished thought
>> Again with my admin hat it should not it.
> it should be able because you are not the admin of my servers :-)


Thankfully I'm not.

I manage up to 100 server instances which kinda is enough and fills my 
quota .

>
>> It should provide the admin with the means to take actions if an failure occurs since in large deployments you
>> might want send different email depending on which service is failing like sending hostmaster at example.com mail if
>> bind goes down, webmaster at example.com if apache goes down etc.
> in your environemnt maybe, but it should generally have SIMPLE options
> for setups where hostmaster, webmaster, postmaster is the same person

Then create a unit that only sends failure notifications to root hey you 
can even call it RestartNotifyMail.service....

>
>> and at the same time take other action like potentially trigger abrt to send bug report or
>> revert changes and restart the daemon etc. as opposed to pipe a simple mail notification
>> to root and systemd provides exactly that to admins via OnFailure= see man systemd.unit
>> for details...
> http://0pointer.de/public/systemd-man/systemd.unit.html does not contain the word "mail"
> "RestartNotifyMail=root" would be what is needed in SOHO environments!
>
> well but a) there are missing options and b) OnFailure is simply a joke
> if i say "Restart=always" then OnFailure is NOT triggered

Why should it be honestly I would like to hear those arguments which 
should be rather interesting...

> if i say "Restart=always" i want a mail if this happens
> not a own unit-file

This is just laughable no admin would do this so go ahead and shoot 
yourself in the foot but dont be complaining on this list of the lack of 
options ( or some option not working ) and what not in the process so 
anyone who might be passing by on the worldwideweb ignore this and set a 
more sane Restart option for your environment/deployment as in 
Restart=on-failure and create a set of good units to use with that in 
OnFailure=.

When service(s) fail they fail for a reason and admin should inspect the 
cause of that...
( thou some apparently would like to be spammed to death when that 
service is stuck in a restart loop )...

JBG


More information about the systemd-devel mailing list