[systemd-devel] Requires and After

Jonathon Kowalski bl0pbl33p at gmail.com
Thu Jan 3 08:22:04 UTC 2019


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 at smile.fr> 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.
>
> --
> [image: SMILE] <http://www.smile.eu/>
>
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> *Jérémy ROSEN*
> Architecte technique
> Responsable de l'expertise Smile-ECS
>
> [image: email] jeremy.rosen at smile.fr
> [image: phone] +33141402967
> [image: url] http://www.smile.eu
>
> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
> <https://www.facebook.com/smileopensource> [image: LinkedIn]
> <https://www.linkedin.com/company/smile> [image: Github]
> <https://github.com/Smile-SA>
>
> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
> <http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>
>
> [image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20190103/0bef8593/attachment-0001.html>


More information about the systemd-devel mailing list