[systemd-devel] Create a target unit to start & stop a group of services

林自均 johnlinp at gmail.com
Tue Feb 27 10:20:37 UTC 2018


Hi Jérémy,

Thank you, but I read the section "Mapping of unit properties to their
inverses" in the man page
https://www.freedesktop.org/software/systemd/man/systemd.unit.html and then
found out the PropagatesReloadTo= and ReloadPropagatedFrom= are inverses to
each other and both can be configured in a unit file. I was wondering why
PartOf= and ConsistsOf= are not the case. Thank you.

John Lin


Jérémy Rosen <jeremy.rosen at smile.fr> 於 2018年2月27日 週二 下午4:35寫道:

>
>
> On 27/02/2018 02:49, 林自均 wrote:
>
> Hi both Michal,
>
> Thank you for the quick responses! I think I will keep on using the tedious
> PartOf= directive.
>
> However, may I ask why ConsistsOf= is readonly? If I can use it in my
> "my-apps.target", that would be great.
>
> Because "ConsistsOf" doesn't exist in the way you think it does...
>
> Every relation between units (Wants, Before, PartOf) needs to have an
> internal, reverse relation for accounting purpose
>
> That reverse relation is usually an internal detail, but it is handy to
> expose
> it in "systemctl show" & co.
>
> So that's what you see, an internal property exposed for ease-of-use. not
> an
> external, user configurable property
>
>
>
> John Lin
>
> Michal Koutný <mkoutny at suse.com> <mkoutny at suse.com> 於 2018年2月26日 週一 下午7:28寫道:
>
>
>
>
> On 02/26/2018 11:08 AM, Michal Sekletar wrote:
>
> Unfortunately, we don't have a dependency (AFAIK) that only propagates
> stop actions.
>
> FTR (not helpful for the original problem), there exists ConsistsOf= as
> an inverse of PartOf= dependency. However, it's read only currently (or
> strictly speaking, writable through the PartOf= endpoint).
>
> Michal
>
> _______________________________________________
> systemd-devel mailing listsystemd-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
>
> _______________________________________________
> systemd-devel mailing listsystemd-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
> --
> [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 <+33%201%2041%2040%2029%2067>
> [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
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180227/de5da9ff/attachment.html>


More information about the systemd-devel mailing list