Bug 478717 - Static /etc/hosts entries ignored after update to 5.3
Static /etc/hosts entries ignored after update to 5.3
Status: CLOSED DUPLICATE of bug 478716
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: glibc (Show other bugs)
All Linux
urgent Severity urgent
: rc
: ---
Assigned To: Jakub Jelinek
: Regression
Depends On:
  Show dependency treegraph
Reported: 2009-01-03 19:14 EST by Daniel Riek
Modified: 2009-01-05 11:38 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-05 11:38:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Riek 2009-01-03 19:14:11 EST
Description of problem:
Autofs ignores static host entries in /etc/hosts after the update to 5.3

How reproducible:

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 10:26:26 EST
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 10:30:09 EST
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 11:08:57 EST
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.

Comment 4 David Kovalsky 2009-01-05 11:14:57 EST
Seems like a NSCD related thing, at least the ping bug, see
Comment 5 Daniel Riek 2009-01-05 11:26:34 EST
ACK. Stopping NSCD workes around the issue.
Comment 6 Jeff Moyer 2009-01-05 11:34:41 EST
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.

Comment 7 Daniel Riek 2009-01-05 11:38:53 EST
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.