Re: Network services start before network is up since migrating to 7.2

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



----- Mail original -----
> De: "Gordon Messmer" <gordon.messmer@xxxxxxxxx>
> À: "centos" <centos@xxxxxxxxxx>
> Envoyé: Jeudi 24 Décembre 2015 07:25:00
> Objet: Re:  Network services start before network is up since migrating to 7.2

> On 12/23/2015 08:38 AM, Sylvain CANOINE wrote:
>> Then I'm wondering :
>> 2/ why "After=foo" does not imply "Requires=foo" for systemd 219, while it
>> appeared to be in systemd 208. Either it's a regression, or the behaviour of
>> 208, although logical, is buggy.
> 
> I'm not entirely certain, but "After=" is independent of "Requires=", as
> documented on an up-to-date install of CentOS 7.
http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ says :
"Services using the network should hence simply place an After=network.target dependency in their unit files, and avoid any Wants=network.target or even Requires=network.target."

But all the other related explanations I found on the web either says nothing about the relationship between "After=" and "Requires="/"Wants=", or confirms there's not. For example in http://www.freedesktop.org/software/systemd/man/systemd.unit.html :
"Note that this setting (NDR : "After=" or "Before=") is independent of and orthogonal to the requirement dependencies as configured by Requires=."

I didn't found the related CentOS documentation, but I suppose it's correct. I suppose it mentions NetworkManger, anyway.

<digression>I'm able to understand systemd isn't designed to make the relationship between "After=" and "Requires="... But why designing it like that ? Giving the ability to start a service before or after a disabled other is a nonsense.</digression>

But all of that don't give any clue concerning the different behaviour of the two quoted versions of systemd. I think an additional "Requires=network.target" parameter in the network-online.target unit by default, or at least a note to the users, would be appreciated.

Sylvain.



Pensez ENVIRONNEMENT : n'imprimer que si ncessaire

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux