[systemd-devel] Systemd flapping detection

tsuraan tsuraan at gmail.com
Wed Nov 2 13:46:43 PDT 2011


Is there a way to disable systemd's flapping detection that causes it
to give up on starting services that exit too quickly?  The closest
thing I can find to controlling this is the Restart= option, but that
doesn't seem to do what I need.  My situation is that each PC is a
node of a cluster.  When a PC reboots, it can take a while for the
cluster to recognize that it has left, and until that happens attempts
to rejoin the cluster are rejected.  The daemon in charge of joining
the cluster dies when it cannot join, and then systemd restarts it.
The problem is that systemd gets sick of restarting it after a while
(5 tries?), and then the node is just broken.  So, I could have the
daemon loop until it can join, but since I have a handful of daemons
that behave this way, and systemd is really good at cleaning up and
restarting things, I'd like to let systemd do the restarting work.  Is
there anything I can tune to make systemd not give up, or do I just
need to rewrite all the main functions of my daemons to do the looping
themselves?

Also, are there any docs that detail how systemd does its flapping
detection?  Is there some time that a service has to have been running
in order for it to not be considered flapping, or an exit code that
systemd looks for?  Any details would be appreciated.

Thanks!


More information about the systemd-devel mailing list