[systemd-devel] [PATCH] don't check ratelimit on manual start

Lennart Poettering lennart at poettering.net
Wed Sep 12 23:55:21 PDT 2012


On Wed, 29.08.12 13:28, Lukáš Nykrýn (lnykryn at redhat.com) wrote:

> Hello,

Heya,

> I have here a request that systemd should not refuse to start service
> because of "start request repeated too quickly" when service is
> started manually.  I have prepared a patch, but I am not sure about my
> approach.

Hmm, I like the idea, but the approach not so much. ;-)

Maybe we can simply solve this on the client side? "systemctl
reset-failed" can already reset the rate limiter and allows you to
subsequently start the service without refusing.

Hmm, also: "systemctl start" might be something that is called by
scripts. In that case, maybe we the rate limit should not be ignored
after all?

So, here's what I'd propose: in systemctl, when the start job failed with
SERVICE_FAILURE_START_LIMIT and we are running on a tty simply print a
nice human readable suggestion:

"Starting foobar.service has been attempted too often too quickly, the
repeated start of the unit has been refused. To force a start please
invoke 'systemctl reset-failed foobar.service' followed by 'systemctl
start foobar.service' again."

Another idea would be to add a switch to "systemctl start" which when
specified does the "reset-failed" right before the "start". But I am
tempted to say we already have enough switches in systemctl, hence I'd
prefer the proposal above.

Hope this makes sense,

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list