Bug 1491243
| Summary: | [NMCI] dhcp-timeout test fails | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Vladimir Benes <vbenes> | ||||||
| Component: | NetworkManager | Assignee: | Francesco Giudici <fgiudici> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Desktop QE <desktop-qa-list> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 7.4 | CC: | 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
Vladimir Benes
2017-09-13 11:41:41 UTC
Fixed upstream already. 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. 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.
nm_dhcp_dhclient_create_config() is so ugly. E.g. !strncmp (p, TIMEOUT_TAG, strlen (TIMEOUT_TAG) also matches "timeoutxyz". Anyway, patch lgtm. Created attachment 1326387 [details]
NM patch to leverage universal dhclient "timeout" configuration option (II)
(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. Merged upstream. Master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=1cb4832f0933dda36556c36b2b7b2306cf76139a nm-1-8: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=5499dda250856f6e792b9a5cf3c8b6f98713d8f0 we have it working correctly in 1.10 and master too. 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 |