Bug 472121

Summary: NIS host resolution fails for some host entries
Product: [Fedora] Fedora Reporter: Jimmy Dorff <jdorff>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 10CC: emmanuel.thome, jakub
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-01 16:08:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jimmy Dorff 2008-11-18 20:39:28 UTC
Description of problem:
When resolving hosts via NIS, there seems to be a problem resolving if the host's map entry contains multiple names for the host.

Version-Release number of selected component (if applicable):
glibc-2.9-2.i686

How reproducible:
You will need a working NIS domain. I have the following:
$ grep hosts /etc/nsswitch.conf 
hosts:      files nis dns

Steps to Reproduce:
1. 
Find a host with multiple hostnames in the NIS host map:
$ ypmatch monserv hosts
152.3.182.15		monserv.phy.duke.edu monserv loghost
Observe that name lookups fail for that host (just using wget as an example app since it's verbose):
$ wget monserv
Resolving monserv... failed: Name or service not known.
$ wget loghost
Resolving loghost... failed: Name or service not known.

Find a host with a simple NIS host entry:
$ ypmatch rhic00 hosts
152.3.182.72		rhic00.phy.duke.edu rhic00
Observe that it resolves correctly:
$ wget rhic00
Resolving rhic00... 152.3.182.72

2.
Disable NIS host resolution and observe that all hosts now work using DNS:
$ grep hosts /etc/nsswitch.conf
hosts:      files dns
$ wget monserv
Resolving monserv... 152.3.182.15
$ wget rhic00
Resolving rhic00... 152.3.182.72

Actual results:
NIS names resolution fails for multi name host entries

Expected results:
NIS resolution should work for multi name hosts in the same manner that the local file "/etc/hosts" does.

Additional info:
ypbind-1.20.4-8.fc10.i386
yp-tools-2.9-4.i386
kernel-2.6.27.5-113.fc10.i686
SELINUX=disabled

Comment 1 Bug Zapper 2008-11-26 05:34:51 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Emmanuel Thomé 2008-11-28 09:13:31 UTC
Jimmy, could you check that this is indeed a duplicate of bug 473073 ?

Comment 3 Jimmy Dorff 2008-12-01 16:07:51 UTC
Yes, this bug is the same as bug 473073

Comment 4 Jimmy Dorff 2008-12-01 16:08:59 UTC

*** This bug has been marked as a duplicate of bug 473073 ***