Bug 1260552
Summary: | dhclient called with -H when DHCP_HOSTNAME is a FQDN | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Beniamino Galvani <bgalvani> |
Component: | initscripts | Assignee: | David Kaspar // Dee'Kej <deekej> |
Status: | CLOSED ERRATA | QA Contact: | Leos Pol <lpol> |
Severity: | high | Docs Contact: | Filip Hanzelka <fhanzelk> |
Priority: | unspecified | ||
Version: | 7.1 | CC: | dcbw, deekej, fhanzelk, jhunt, jscotka, lnykryn, mazzystr, ptalbert |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | initscripts-9.49.39-1.el7 | Doc Type: | Enhancement |
Doc Text: |
"DHCP_FQDN" allows specifying a fully qualified domain name of the system
Previously, the `ifcfg` interface configuration files required that the "DHCP_HOSTNAME" directive was used to specify the hostname of the system. The new initscripts "DHCP_FQDN" directive now also allows specifying the fully qualified domain name of the system. This is a complement to the "DHCP_HOSTNAME" directive. In case both "DHCP_HOSTNAME" and "DHCP_FQDN" are specified, only "DHCP_FQDN" is used.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 07:29:01 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1298243, 1393867, 1400961 |
Description
Beniamino Galvani
2015-09-07 08:51:30 UTC
DHCP_HOSTNAME should not be FQDN, it was always supposed to be short hostname, which should be fine for the -H. The intention of the patch you mentioned was to guarantee that, but it was messed up. The second part should be in source_config function, not in expand_config.
> In my opinion the correct behavior for both NetworkManager and
> initscripts would be to avoid stripping HOSTNAME and DHCP_HOSTNAME and
> to use the -F dhclient option when the hostname we are going to send
> is a fully-qualified one.
That would break for those who are specifying here a short hostname.
I think that correct solution here is to add a new DHCP_FQDN_HOSTNAME variable.
(In reply to Lukáš Nykrýn from comment #2) > > In my opinion the correct behavior for both NetworkManager and > > initscripts would be to avoid stripping HOSTNAME and DHCP_HOSTNAME and > > to use the -F dhclient option when the hostname we are going to send > > is a fully-qualified one. > > That would break for those who are specifying here a short hostname. When the hostname is short the -H option would be used, as it is now. But yeah, for those using a FQDN there would be a change in behavior since dhclient would start to send -F instead of -H. > I think that correct solution here is to add a new DHCP_FQDN_HOSTNAME > variable. Sounds good to me. And since -F and -H are mutually exclusive, when both DHCP_HOSTNAME and DHCP_FQDN_HOSTNAME are present the latter should be used. If none is present the system hostname probably should be always sent with -H (to preserve backwards compatibility). Since the variables are shared between IPv4 and IPv6, it is not possible to use different options for the two, but probably this is not a big limitation. FYI, in NetworkManager 1.2 a new DHCP_FQDN ifcfg-rh variable will be supported for setting the qualified domain name to send to DHCP server. See bug 1255507 for reference. Can we expect this update to be added to Red Hat Enterprise Linux 7.3? /Chris Callegari Pull request accepted: https://github.com/fedora-sysv/initscripts/pull/92 This is now part of RHEL-7 branch: https://github.com/fedora-sysv/initscripts/pull/95 initscripts-9.49.39-1.el7 verified by TC 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-2017:2286 |