[systemd-devel] a problem about the order of service shudown in systeamd

Reindl Harald h.reindl at thelounge.net
Fri Sep 18 02:59:18 PDT 2015



Am 18.09.2015 um 11:51 schrieb lucien xin:
> On Fri, Sep 18, 2015 at 5:11 PM, Reindl Harald <h.reindl at thelounge.net> wrote:
>>
>>
>> Am 18.09.2015 um 11:03 schrieb lucien xin:
>>>
>>> is there a options that can define some common shutdown/boot order
>>> priority? not through dependence( After= and Before= you mentioned).
>>
>>
>> no, and it makes no sense at all
>>
>> wether servcies are dpending on each other then you need to define
>> dependencies and if they are not they don't need to be ordered and can start
>> in parallel
>>
>>> for example, A.service maybe 5, network.target and teamd are 1, the
>>> service whose order priority is 4 will be shudown earlier than that
>>> priority is 1.
>>
>>
>> that would be unmanageable because it interfers with Before/After/Requires
>> and at the end of the day you have conflicts or no idea what is schedlued
>> how and why
>>
>>
> okay,
>
> as to the case I mentioned, if A.service want to be shutdown before
> teamd, the only way is to configure After=/Before= options
> in A.serivce, right?

yes

while it make sno difference if you define Before= in one unit or After= 
in the other, if a service at shutdown should be stopped before another 
one it needs just to be startet afterward at boot

and it makes sense

* something needs networking
* so it is started after networking at boot
* well, it is hence implicit stopped before network at shutdown
* otherwise it may hang because it does some network operation
   at stop while network is no longer there
* that's why it are dependencies which also means one needs the other




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150918/7885c295/attachment-0001.sig>


More information about the systemd-devel mailing list