Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2025617

Summary: Make timeout optional and remove arbitrary and undocumented maximum timeout for nm-online
Product: Red Hat Enterprise Linux 8 Reporter: Nate <nlager>
Component: NetworkManagerAssignee: Fernando F. Mancera <ferferna>
Status: CLOSED ERRATA QA Contact: Filip Pokryvka <fpokryvk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.3CC: bgalvani, fpokryvk, lrintel, rkhan, sukulkar, systemd-maint-list, thaller, till, vbubela, wenliang
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 10:07:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nate 2021-11-22 15:34:32 UTC
Description of problem:
The NetworkManager-wait-online.service unit in systemd calls the nm-online executable, in order to determine if the network is in fact online before completing.  This executable has a default timeout of 30 seconds, but can be specified with the -t option. Or an environment variable. This timeout has a maximum of 3600 seconds (https://github.com/NetworkManager/NetworkManager/blob/main/src/nm-online/nm-online.c#L292).  The documentation does not mention this, and the command line error returned when specifying a timeout above 3600 is not helpful.  This RFE proposes that the timeout be made optional (allowing a user to choose to make nm-online wait forever) and to remove the 3600 second upper limit, as it seems arbitrary.  

The addition of a "--forever" option, or "--no-timeout" could satisfy the first request, without changing the default timeout.  


Version-Release number of selected component (if applicable):
My testing was performed on NetworkManager-1.26.0-14.el8_3

Comment 3 Till Maas 2022-01-25 23:22:18 UTC
Thomas, what is the reason for the 3600s upper boundary for the timeout?

Comment 5 Thomas Haller 2022-01-26 10:11:32 UTC
(In reply to Till Maas from comment #3)
> Thomas, what is the reason for the 3600s upper boundary for the timeout?

No reason, except that one hour as already very (very) long. There is no problem at all to increase the maximum timeout. I just don't think that is helpful.


Also, "in order to determine if the network is in fact online before completing" is only partly correct (depending on interpretation what this means). NetworkManager-wait-online calls `nm-online --wait-for-startup` which technically waits until NetworkManager logs "startup complete", which is the point when all devices reached a state where there is nothing to progress (e.g. `nmcli device` shows no device activating state, among others).

So, unless you also set very unusual timeouts in the NetworkManager profile (like high ipv4.required-timeout and ipv4.dhcp-timeout), NetworkManager will reach startup-complete after a few minutes -- even if the system is not connected/online.

-- the exception is if you start a bridge/bond interface with DHCP, but without any slaves. In fact, that waits forever, but such a configuration isn't useful and likely a configuration error.

So even if the user configures a timeout of one hour (or more), I don't think that it does what the user ultimately wants.


In https://bugzilla.redhat.com/show_bug.cgi?id=1960116#c5, I was talking about replacing `NetworkManager-wait-online.service` with your own service that does the waiting suited for you. It's clear that NetworkManager-wait-online.service provides some generally useful functionality, but if that is not what you want, it is perfectly fine to replace it with your own service/script.  Of course, it's also perfectly fine to discuss how to make NetworkManager-wait-online.service also cover that use-case, it just takes longer and we need to find an agreement what to do exactly and how to make it useful in general.

Comment 12 errata-xmlrpc 2022-11-08 10:07:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (NetworkManager bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7680