Re: Requires and After

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

 



a.service will just not stop after it gets activated, and b.service fails. Otherwise, the start job is cancelled with a JOB_DEPENDENCY job result. If you need those semantics (and people often do), use After=, so that the start job for a waits for the running job of b to complete (note that if you have other things it needs to wait on, it will infact wait on them and may even produce results you get with After=).

There may be a case made about installing a job of type JOB_STOP if and ever b.service's *activation* fails, even after a.service activates successfully, but I wonder if people are already using Requires= alone to just cause the explicit stop requests (which is why they might not be usinf PartOf=) of the required unit to take down their service, and startup dependencies don't really matter. With this change, you'd break that then.

On Thursday, January 3, 2019, Jérémy Rosen <jeremy.rosen@xxxxxxxx> wrote:

Make of that what you will. I was expecting a.service to stop because 
b.service failed, but apparently my understanding of this isn't quite 
right.

And that's kinda my point... most people (me included until recently) expect that behaviour

I think the overall conclusion of that conversation is that... everything is very confusing and everybody is very confused.


I'll try to clarify the docs and create a PR for that... It seems to be severely needed.

--
SMILE

20 rue des Jardins
92600 Asnières-sur-Seine

Jérémy ROSEN
Architecte technique
Responsable de l'expertise Smile-ECS

email jeremy.rosen@xxxxxxxx
phone +33141402967
url http://www.smile.eu

Twitter Facebook LinkedIn Github

Découvrez l’univers Smile, rendez-vous sur
                smile.eu

eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
_______________________________________________
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