On Wed, 2019-10-09 at 09:13 +0000, Jorge Perez Higuera via networkmanager-list wrote:
I'm not sure if I can attach a log file. Let's try :| This is the interface configuration file NAME="Public ens192" TYPE=Ethernet DEVICE=ens192 ONBOOT=yes BOOTPROTO=dhcp IPV6INIT=yes IPV6_AUTOCONF=no IPV6_FAILURE_FATAL=no DHCPV6C=yes DHCPV6_DUID=ll
Hi, thanks for the log. You see there "pending_action" mentioned. This internally delays startup complete. Indeed, there is a bug there. I opened a merge request with a possible fix [1]. I don't see an easy workaround for you. Maybe one of: - fix your networking environmnet. The router should not indicate to use DHCPv6, when no DHCPv6 server is replying. - if you don't need IPv6, set ipv6.method=disabled - `systemctl disable NetworkManager-wait-online.service` and write your own script that you order `Before=network-online.target` and `After=network.target`. You can implement their whatever policy suits you. - maybe `systemctl edit NetworkManager-wait-online.service` and set the timeout to something shorter. 30 seconds is conservatively long already. Of course, then the service will be marked as failed, so maybe also configure it to ignore the return value of the `nm-online` tool. [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/304 best, Thomas
-----Mensaje original----- De: Thomas Haller [mailto:thaller redhat com] Enviado el: martes, 8 de octubre de 2019 21:00 Para: Jorge Perez Higuera; networkmanager-list gnome org Asunto: Re: Need to send the dhclient6 to background in Centos 8 On Tue, 2019-10-08 at 16:14 +0000, Jorge Perez Higuera via networkmanager-list wrote:So that is not working here. The machine gets the Ipv4 address quickly and the dhclient ipv6 process starts getting an ip. 30 seconds later the NetworkManager-wait-online service waits until it fails. If I create an ipv6 reservation in the dhcp server the machine boots good with bot ipv4 and ipv6 addressesThat sounds not correct. I would enable level=TRACE logging. See [1] for hints about logging and rate-limiting of journal. [1] https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/contrib/fedora/rpm/NetworkManager.conf#n28 Then look at the log for a message like <info> [1570445723.4941] manager: startup complete NetworkManager-wait-online basically waits for this point. There are also logging messages earlier, telling you why "startup complete" is not yet reached, and why NM waits longer... A common reason is that you have a bridge/bond/team master that autoactivates without slaves. Such a device has no carrier and cannot fully activate, delaying "startup complete" indefinitely. best, ThomasThe network setup is correct in this environment: NAME="whatever" TYPE=Ethernet DEVICE=<interface> ONBOOT=yes BOOTPROTO=dhcp IPV6INIT=yes IPV6_AUTOCONF=no IPV6_FAILURE_FATAL=no (inverse "may fail" meaning) DHCPV6C=yes DHCPV6_DUID=ll -----Mensaje original----- De: Thomas Haller [mailto:thaller redhat com] Enviado el: martes, 8 de octubre de 2019 18:05 Para: Jorge Perez Higuera; networkmanager-list gnome org Asunto: Re: Need to send the dhclient6 to background in Centos 8 On Tue, 2019-10-08 at 15:10 +0000, Jorge Perez Higuera via networkmanager-list wrote:If the dhcp server does not send an ipv6 lease IP, dhclient ipv6 process tries to get that ip during 30 seconds. That causes (i can see that via systemd-analyze blame) the startup of the NetworkManager-wait-online service is delayed, delaying the network-online.target I have services depending of this target and that delay causes some troubles to me.Hi, DHCPv6 is only done if either - "ipv6.method=dhcp" is configured in the profile - "ipv6.method=auto" is configured in the profile, and the IPv6 router in your network sets the managed flag in its router advertisements, to indicate to use DHCPv6. It seems better to fix your configuration and/or networking setup. Also, if you configure ipv6.may-fail=yes and the device gets a IPv4 address, then the entire device is considered active (and no longer blocks NetworkManager-wait-online). So, if you care about IPv6, you maybe want to set ipv6.may-fail=no. best, Thomas-----Mensaje original----- De: Thomas Haller [mailto:thaller redhat com] Enviado el: martes, 8 de octubre de 2019 14:00 Para: Jorge Perez Higuera; networkmanager-list gnome org Asunto: Re: Need to send the dhclient6 to background in Centos 8 On Tue, 2019-10-08 at 11:37 +0000, Jorge Perez Higuera via networkmanager-list wrote:Hi all. I need some help I need to send the dhclient ipv6 process to background (I use dhcp=dhclient) I know it can be done passing the –nw parameter via dhclient but i don’t know how to pass this to dhclient via NetworkManager Also in Centos 8 it start in foreground (-d parameter) Is there any way to do this? Is is posible via internal client? NetworkManager 1.14.0 Centos 8 Thank youHi, when NetworkManager uses dhclient as its DHCP plugin, then the process is controlled by NetworkManager. In that case, NetworkManager will always spawn the process in the background. That is regardless whether NetworkManager itself is in the background or not). Anyway, the way NetworkManager spawns this process is of little concern to the user. In fact, when using NetworkManager you usually would be not concerned with dhclient at all. The process is for the most part an implementation detail of how NetworkManager does DHCP. Which problem are you trying to solve? best, Thomas
Attachment:
signature.asc
Description: This is a digitally signed message part