Sylvain CANOINE
2015-Dec-23 11:26 UTC
[CentOS] Network services start before network is up since migrating to 7.2
----- Mail original -----> De: "Gordon Messmer" <gordon.messmer at gmail.com> > ?: "centos" <centos at centos.org> > Envoy?: Mercredi 23 D?cembre 2015 10:11:05 > Objet: Re: [CentOS] Network services start before network is up since migrating to 7.2> I'm a little confused, too. But, it might be more informative to query > the system for "network.target" than "network.service" since the former > is the one missing.# rpm -V systemd S.5....T. c /etc/rc.d/rc.local Ok, normal... # ll /usr/lib/systemd/system/network.target -rw-r--r--. 1 root root 480 20 nov. 05:49 /usr/lib/systemd/system/network.target # cat /usr/lib/systemd/system/network.target # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] Description=Network Documentation=man:systemd.special(7) Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget After=network-pre.target RefuseManualStart=yes # systemctl status network.target ? network.target - Network Loaded: loaded (/usr/lib/systemd/system/network.target; static; vendor preset: disabled) Active: inactive (dead) Docs: man:systemd.special(7) http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget Dead ? Hmmm... Sylvain. Pensez ENVIRONNEMENT : n'imprimer que si ncessaire
Sylvain CANOINE
2015-Dec-23 16:38 UTC
[CentOS] Network services start before network is up since migrating to 7.2
----- Mail original -----> De: "Sylvain CANOINE" <sylvain.canoine at tv5monde.org> > ?: "centos" <centos at centos.org> > Envoy?: Mercredi 23 D?cembre 2015 12:26:39 > Objet: Re: [CentOS] Network services start before network is up since migrating to 7.2> > # systemctl status network.target > ? network.target - Network > Loaded: loaded (/usr/lib/systemd/system/network.target; static; vendor preset: > disabled) > Active: inactive (dead) > Docs: man:systemd.special(7) > http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget > > Dead ? Hmmm...Ok, I found the difference between the failing servers (I updated one more this morning, and the same symptom came) : the failing ones don't need to mount NFS shares. So I didn't install nfs-utils, so there's not a rpc-statd-notify.service, which unit file contain "Requires=network.target"... And so there's no service "requiring" network.target at all ! Then I'm wondering : 1/ why "After=foo" does not imply "Requires=foo" for systemd. That's obvious, yet, 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. Anyway, for the NetworkManager-opponents, it may be opportune to add a "Requires=network.target" on an usual network service's unit, such as sshd ou ntpd... Or, better, on network-online.target's unit. I chose another solution : I made a symlink to /usr/lib/systemd/system/network/target in /etc/systemd/system/multi-user.target.wants/ directory ("systemctl enable network.target" sent me to hell). And voil?. Sylvain. Pensez ENVIRONNEMENT : n'imprimer que si ncessaire
Gordon Messmer
2015-Dec-24 06:25 UTC
[CentOS] 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.
Seemingly Similar Threads
- Network services start before network is up since migrating to 7.2
- Network services start before network is up since migrating to 7.2
- Network services start before network is up since migrating to 7.2
- Network services start before network is up since migrating to 7.2
- IPtables block user from outbound ICMP