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 1491243 - [NMCI] dhcp-timeout test fails
Summary: [NMCI] dhcp-timeout test fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Francesco Giudici
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-13 11:41 UTC by Vladimir Benes
Modified: 2018-04-10 13:30 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 13:29:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
NM patch to leverage universal dhclient "timeout" configuration option (15.10 KB, patch)
2017-09-14 15:19 UTC, Francesco Giudici
no flags Details | Diff
NM patch to leverage universal dhclient "timeout" configuration option (II) (15.10 KB, patch)
2017-09-15 10:17 UTC, Francesco Giudici
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0778 0 None None None 2018-04-10 13:30:48 UTC

Description Vladimir Benes 2017-09-13 11:41:41 UTC
Description of problem:
https://github.com/NetworkManager/NetworkManager/commit/fa46736013fa1e3df1508b1f67b495ce45daf94a

seems to break NM under RHEL as RHEL still uses -timeout and not --timeout as Fedora does.

Version-Release number of selected component (if applicable):
1.8.x and master

Comment 2 Thomas Haller 2017-09-13 12:43:48 UTC
Fixed upstream already.

Comment 3 Thomas Haller 2017-09-13 13:31:50 UTC
Ah, not fixed correctly.


The timeout option is a downstream patch to dhclient in Fedora/RHEL.


Upstream NetworkManager should not make use of downstream patches (without alternative/opt-in/opt-out).

Even worse, since Fedora uses --timeout and RHEL uses -timeout, even without Fedora/RHEL we need to build/configure NM differently.


I think upstream NM should drop this option (by default), but make it easy to adjust both for Fedora/RHEL.

One option could be a configure option like "--with-timeout-option=$OPT", and adjust contrib/rpm's SPEC file to pass either "--with-timeout-option=-timeout" or "--with-timeout-option=--timeout" on RHEL or Fedora.

Or just add a external patch that is used by contrib/rpm, depending on RHEL or Fedora.

Comment 4 Francesco Giudici 2017-09-14 15:19:35 UTC
Created attachment 1326100 [details]
NM patch to leverage universal dhclient "timeout" configuration option

The best option here seems to avoid using the command line "--timeout" argument.
The original package offers a corresponding "timeout" option to be placed in the configuration file.
This would allow to let it be usable by every linux distro and version using dhclient.

Attached patch, please review.

Comment 5 Thomas Haller 2017-09-14 16:13:51 UTC
nm_dhcp_dhclient_create_config() is so ugly. E.g.
  !strncmp (p, TIMEOUT_TAG, strlen (TIMEOUT_TAG)
also matches "timeoutxyz".

Anyway, patch lgtm.

Comment 6 Francesco Giudici 2017-09-15 10:17:44 UTC
Created attachment 1326387 [details]
NM patch to leverage universal dhclient "timeout" configuration option (II)

Comment 7 Francesco Giudici 2017-09-15 10:20:39 UTC
(In reply to Thomas Haller from comment #5)
> nm_dhcp_dhclient_create_config() is so ugly. E.g.
>   !strncmp (p, TIMEOUT_TAG, strlen (TIMEOUT_TAG)
> also matches "timeoutxyz".
> 
> Anyway, patch lgtm.

Thanks for reviewing.
I have just done a minor change to TIMEOUT_TAG and RETRY_TAG to include a trailing space: this would make the match a bit more restrictive.
Updated the patch and going to merge.

Comment 10 Vladimir Benes 2018-01-16 11:54:14 UTC
we have it working correctly in 1.10 and master too.

Comment 13 errata-xmlrpc 2018-04-10 13:29:44 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, 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-2018:0778


Note You need to log in before you can comment on or make changes to this bug.