Bug 478717 - Static /etc/hosts entries ignored after update to 5.3
Summary: Static /etc/hosts entries ignored after update to 5.3
Keywords:
Status: CLOSED DUPLICATE of bug 478716
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: glibc
Version: 5.3
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-04 00:14 UTC by Daniel Riek
Modified: 2009-01-05 16:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-05 16:38:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Daniel Riek 2009-01-04 00:14:11 UTC
Description of problem:
Autofs ignores static host entries in /etc/hosts after the update to 5.3

How reproducible:
Always

Steps to Reproduce:
1. Create a know-to work /etc/hosts file on a 5.3 installation (or update a working 5.2 machine to 5.3). 
2. Make sure to add a hostname for a test nfs server that does not otherwise resolve (through DNS).
3. Configure autofs to use the hosts map for the /net path (default)
4. Verify that the IP address is pingable and that 
5. Verify that automount can access the test server under its ip address (ls /net/IP/)
6. Try to access the test server under it's name defined in /etc/hosts (ls /net/NAME/)
  
Actual results:
ls reports "No such file or directory" and /var/log/messages contains:
automount[PID]: create_udp_client:90: hostname lookup failed: Operation not permitted
automount[PID]: create_tcp_client:299: hostname lookup failed: Operation not permitted
automount[PID]: lookup_mount: exports lookup failed for HOST


Expected results:
Ls lists the exported directories as it does when using the IP address.

Additional info:
A similar issue seems to exist with ping (bug 478716), while ssh, wget, curl, elinks, traceroute or telnet are not affected.

Opening against autofs as it does not affect most other users of libresolv.

Comment 1 Daniel Riek 2009-01-05 15:26:26 UTC
The original issue was seen in a Xen guest on x86_64. The issues does not show in i386 bare metal.

Comment 2 Daniel Riek 2009-01-05 15:30:09 UTC
SELinux was in permissive mode on the x86_64 Xen guest where this issue was
seen and in enforcing mode on the i386 bare metal machine where it did not
reproduce. So it does not seem to be a factor.

showmount -e shows the same issue and might be the underlying cause: it is called from auto.net to find the exports from the server and calling it separately creates the same log messages.

Comment 3 Jeff Moyer 2009-01-05 16:08:57 UTC
Please include your auto.master.  In autofs version 5, you should not be using the auto.net script.  The line in auto.master should instead read:

/net -hosts

Please also include your /etc/nsswitch.conf file.

Thanks!

Comment 4 David Kovalsky 2009-01-05 16:14:57 UTC
Seems like a NSCD related thing, at least the ping bug, see
https://bugzilla.redhat.com/show_bug.cgi?id=478716#c10

Comment 5 Daniel Riek 2009-01-05 16:26:34 UTC
ACK. Stopping NSCD workes around the issue.

Comment 6 Jeff Moyer 2009-01-05 16:34:41 UTC
OK, reassigning to glibc.  Please feel free to throw it back over the fence (with the requested configuration files) if the issue is not with nscd.

Thanks!

Comment 7 Daniel Riek 2009-01-05 16:38:53 UTC
Closing dupe against bug 478716 as it seems to be the same underlying nscd issue.

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


Note You need to log in before you can comment on or make changes to this bug.