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 1491243

Summary: [NMCI] dhcp-timeout test fails
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir Benes <vbenes>
Component: NetworkManagerAssignee: Francesco Giudici <fgiudici>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: atragler, bgalvani, fgiudici, lrintel, rkhan, sukulkar, thaller
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 13:29:44 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:
Attachments:
Description Flags
NM patch to leverage universal dhclient "timeout" configuration option
none
NM patch to leverage universal dhclient "timeout" configuration option (II) none

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