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

Reindl Harald h.reindl at thelounge.net
Thu Sep 1 05:23:20 PDT 2011


first see my attached examples of a per-minute cronjob with its config-file
this works perfectly since years, with F15 this works NOT the same way because
a forced restart per shell would not be recognized, a reboot would not
be recognized and since "systemctl" gives NO FEEDBACK the so generated
mails are useless

it does not matter if YOU like this implementation as long it
works for years perfectly and i am responsible for it

Am 01.09.2011 13:53, schrieb "Jóhann B. Guðmundsson":
> 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 .
>

well mine are 30 (mail, web, dns, epp-interfaces, netatalk, samba, spamfirewalls)
and since i am developer at the same time you can believe my quota is more
than full for dealing with unbaked changes

>>
>>> 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....
>

without any documentation?
where is the documentation hwo to do this?

>>
>>> 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 a server is primary a WEBSERVER httpd has to be restarted if it does not run
if somebody does a "killall httpd" it SHOULD start it again
if i want httpd down i stop crond for whatever reason - easy to manage
if it is restarted i want a notify mail

this time a cronjob every minute this does and it recognizes if reboot/shutdown
or /sbin/service is active to not force the restart

this does no longer work with Fedora 15
so i need a replacement
but systemd is only a blind batcher

>> 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 
explain me not my job - i know exactly what i do the only thing i do not know
is how to deal with systemd that all the perfect working this are working exactly
as they do since years
> 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=.
IT IS missing

|on-failure| AND |on-abort| is valid and better than always
but the lacking of configure both forces me to use "always"
what exactly do you not understand?

> 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 )...

you tell me nothing new and that is why i want a simple mail if it happens
and that is why my cronjob is running once per minute and a maximum of
60 mails per hour is NOT spamming to death

but this does not change the fact that SOMETIMES services are hanging like dbmail-lmtpd
did sometimes, as i woke up i noticed this started the service and made a "postqueue -f"

the service did not fail for days and if i would had my cron-job write after this
NO SINGLE PROBLEM for customers would have exist

so do not explain me after ten years waht i need for our services
i have all i need for them on F14 and nwo my problem is how to deal with
systemd since it brings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110901/7110241f/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rh_watchdog.php
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110901/7110241f/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110901/7110241f/attachment.pgp>


More information about the systemd-devel mailing list