[systemd-devel] Requires and After

Jérémy Rosen jeremy.rosen at smile.fr
Wed Jan 2 08:54:35 UTC 2019


> In my opinion, I don't think the extra inconsistency we get from this is
> worth it. It literally only saves one line in a unit file.
>
It's not about saving a line in the unit file, it's about avoiding 
errors on the most common case

i.e if A Requires B, you would expect failures of B to prevent A from 
starting.
* This is not the case if B is (randomly) scheduled after A.
* This is the case if B is (randomly) scheduled before A.
This is the race the implicit After= would prevent.

That being said... the fact that Requires influences both startup and 
restart/shutdown makes things a
bit more complicated...

 From reading the documentation it seems that Requires without After is 
equivalent to PartOf and
thus is suspicious (if you want PartOf, you should use PartOf, if you 
want Requires, the you should
also use After)

This means that there are cases to be checked for but I still globally 
think that Requires without
After is suspicious, and that an implicit order would make sense... but 
that's just my opinion and
I am still a bit confused about the fine-details of what Requires does.

my understanding is

Requires = Wants + Requisite + PartOf

is that correct ?

Regards
Jérémy
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- 
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

email jeremy.rosen at smile.fr <mailto:jeremy.rosen at smile.fr>
phone +33141402967
url http://www.smile.eu

Twitter <https://twitter.com/GroupeSmile> Facebook 
<https://www.facebook.com/smileopensource> LinkedIn 
<https://www.linkedin.com/company/smile> Github 
<https://github.com/Smile-SA>


Découvrez l’univers Smile, rendez-vous sur smile.eu 
<http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>

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/20190102/dc2ea7af/attachment.html>


More information about the systemd-devel mailing list