Bug 1592974
Summary: | [RFE] If adcli requires FQDN in `hostname` output, would it be possible to have it use `hostname -f` instead? | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Josip Vilicic <jvilicic> |
Component: | adcli | Assignee: | Sumit Bose <sbose> |
Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.9 | CC: | mkosek, pcech |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-05-14 12:44:02 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
Josip Vilicic
2018-06-19 18:12:49 UTC
Additional information: 1) The `hostname` output only has a shortname: $ cat hostname net1682 2) Similarly, the kernel is only aware of the short name: $ cat proc/sys/kernel/hostname net1682 3) But /etc/sysconfig/network has the FQDN: $ cat etc/sysconfig/network NETWORKING=yes HOSTNAME=net1682.net.ucf.edu 4) This may be what returns the shortname: $ cat etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" #GATEWAY="10.169.200.1" HOSTNAME="net1682" <---------- HWADDR="00:50:56:B1:8D:60" #IPADDR="10.169.200.79" IPV6INIT="no" MTU="1500" #NETMASK="255.255.255.0" NM_CONTROLLED="yes" ONBOOT="yes" TYPE="Ethernet" UUID="ddd7b117-364c-46be-b373-fc6f7c52e3d4" First, given that RHEL6 is in Maintenance Phase 2, most probable there will be no change to adcli in RHEL6 anymore, see https://access.redhat.com/support/policy/updates/errata for details. As the adcli man page says adcli uses gethostname() to get the hostname not the hostname command. gethostname() uses the hostname data from the kernel. adcli does this to have a reliable and unique source of the name. The plain hostname command uses the same call. 'hostname -f' tries to canonicalize the name with the help of a reverse DNS lookup. This might work in some environments but fail in others. Often AD DNS servers do not have the table needed for reverse lookups properly filled. Additionally you might run into issue if multiple network interfaces are used. That's why adcli does not use this as a fallback. If 'hostname -f' is reliable working in the given environment and given that the chances for a change in RHEL6 are minimal I would suggest to join with: adcli join --host-fqdn=$(hostname -f) --domin=... bye, Sumit Red Hat Enterprise Linux 6 is in the Maintenance Support 2 Phase. During the Maintenance Support 2 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available. The official life cycle policy can be reviewed here: http://redhat.com/rhel/lifecycle This issue does not meet the inclusion criteria for the Maintenance Support 2 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL: https://access.redhat.com |