Re: Antw: Re: Unexplainable unit restart ("Start request repeated too quickly")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> Michael Chapman <mike@xxxxxxxxxxxxxxxxx> schrieb am 03.06.2019 um 13:14 in
Nachricht <alpine.LFD.2.21.1906032106200.3180@xxxxxxxxxx>:
[...]
> 
> Um, OK. I don't think we're any closer to solving your problem though. :-)

Actually I am!
The root of the problem is that any oneshot service without RemainAfterExit=true is listed as "inactive (dead)" after being started. I think the manual page should be more clear on that fact!
Then if you have a dependency like this (best viewed with a monospaced font):
  B
 / \
A-C-E
 \ /
  D

where A is a target that wants B,C,D, and each of those in turn wants E (which is the oneshot service), the following happens:
When starting A, E is NOT started ONCE, but it is started THREE TIMES, while my expectation was it will be started once only. As I had set a burst limit of 1, an unexpected fauilure was reported.

What I'm unsure: Does systemd wait for each "start of E" to terminate before calling the next one (i.e. serialized), or are the starts being attempted in parallel?

The obvious deficit in systemd is that it does not no a proper 2-pass dependency analysis before executing: If it would do a dependency analysis for starting A, it would see that E has to be started ONCE before B,C,D. In stead it seems to do a 1-pass analysis firing the start of E every time.

I tried two things: 1) Make E robust when being started in parallel multiple times (it could fail before), and 2) increase StartLimitBurst. 2) Seemed to "fix" this problem.

> 
> My hunch is that you've got something restarting iotwatch.target a lot. If 
> iotwatch-generator.service runs quickly, then every time iotwatch.target 
> is restarted iotwatch-generator.service will run. You could hit its start 
> limit that way.




_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux