Bug 1758317

Summary: nslookup / host do not honor the new search domain limits of glibc
Product: Red Hat Enterprise Linux 7 Reporter: Juan Manuel Santos <jsantos>
Component: bindAssignee: Petr Menšík <pemensik>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: medium Docs Contact: Mariya Pershina <mpershin>
Priority: medium    
Version: 7.8CC: fdelehay, fkrska, fweimer, knemcova, lkuprova, mpershin, pemensik, thozza
Target Milestone: rcKeywords: FutureFeature, Patch, Reproducer
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
.`bind-utils` DNS lookup utilities support fewer search domains than `glibc` The `dig`, `host`, and `nslookup` DNS lookup utilities from the `bind-utils` package support only up to 8 search domains, while the `glibc` resolver in the system supports any number of search domains. As a consequence, the DNS lookup utilities may get different results than applications when a search in the `/etc/resolv.conf` file contains more than 8 domains. To work around this problem, use one of the following: * Full names ending with a dot, or * Fewer than nine domains in the `resolv.conf` search clause. Note that it is not recommended to use more than three domains.
Story Points: ---
Clone Of:
: 1816141 (view as bug list) Environment:
Last Closed: 2020-03-30 08:48:38 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:
Bug Depends On:    
Bug Blocks: 1816141, 1821287, 1780577, 1780662    

Comment 2 Petr Menšík 2019-10-04 08:47:32 UTC
Public notes.

Search in nslookup is limited to 8 domains. 
When search in /etc/resolv.conf includes more than 8 domains, only first 8 are tried.

Limit was increased in glibc by bug #677316.

Comment 3 Petr Menšík 2019-10-04 08:55:04 UTC
This number of searches is defined in lib/lwres/include/lwres/lwres.h

#define LWRES_CONFMAXSEARCH 8		/*%< max 8 domains in "search" entry */

No support for dynamic unlimited list is present.

Comment 4 Petr Menšík 2019-10-04 12:18:51 UTC
Steps to Reproduce:
1. sed -i 's/^search .*/search non-existent1.very-long-domain.fedoraproject.org non-existent2.very-long-domain.fedoraproject.org non-existent3.very-long-domain.fedoraproject.org non-existent4.very-long-domain.fedoraproject.org non-existent5.very-long-domain.fedoraproject.org non-existent6.very-long-domain.fedoraproject.org openstacklocal redhat.com/' /etc/resolv.conf
2. [ "$(host access)" == "$(getent host access.redhat.com.)" ] && echo matches
3. sed -i 's/^search .*/search non-existent1.very-long-domain.fedoraproject.org non-existent2.very-long-domain.fedoraproject.org non-existent3.very-long-domain.fedoraproject.org non-existent4.very-long-domain.fedoraproject.org non-existent5.very-long-domain.fedoraproject.org non-existent6.very-long-domain.fedoraproject.org non-existent7.very-long-domain.fedoraproject.org non-existent8.very-long-domain.fedoraproject.org openstacklocal redhat.com/' /etc/resolv.conf
4. [ "$(host access)" == "$(getent host access.redhat.com.)" ] && echo still matches

Comment 5 Petr Menšík 2019-10-04 13:09:55 UTC
Not even the most recent development version handles this different way. Reported upstream [1].

1. https://gitlab.isc.org/isc-projects/bind9/issues/1259

Comment 6 Tomáš Hozza 2019-12-16 11:36:10 UTC
Patch submitted to upstream in https://gitlab.isc.org/isc-projects/bind9/merge_requests/2446

Comment 11 RHEL Program Management 2020-03-30 08:48:38 UTC
Development Management has reviewed and declined this request. You may appeal this decision by using your Red Hat support channels, who will make certain  the issue receives the proper prioritization with product and development management.

https://www.redhat.com/support/process/production/#howto