Bug 122479 - ipcalc failes to find hosnames for addresses
ipcalc failes to find hosnames for addresses
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-04 19:36 EDT by Michal Jaegermann
Modified: 2014-03-16 22:44 EDT (History)
1 user (show)

See Also:
Fixed In Version: 7.52-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-04 21:22:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2004-05-04 19:36:34 EDT
Description of problem:

I am not so sure if this the right spot to complain about but
the problem easily can be demonstrated with ipcalc.

On two installations of FC2T3, one i386 and one x86_64, both have

hosts:      files dns

in /etc/nsswitch.conf and 'order hosts,bind' in /etc/host.conf
and a line like this

192.168.23.196  dyna4.home.front dyna4

in /etc/hosts. On i386 installation one gets:

$ ipcalc -h 192.168.23.196
HOSTNAME=dyna4.home.front

but for x86_64 the same action results in

$ ipcalc -h 192.168.23.196
ipcalc: cannot find hostname for 192.168.23.196: Unknown host

and similar for any other entry listed in /etc/hosts.

Checking with 'strace -e open ...' on i386 one can observe:

# strace -e open ipcalc -h 192.168.23.196
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
open("/etc/popt", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
directory)
open("/root/.popt", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
directory)
open("/etc/nsswitch.conf", O_RDONLY)    = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libnss_files.so.2", O_RDONLY) = 3
open("/etc/resolv.conf", O_RDONLY)      = 3
open("/etc/host.conf", O_RDONLY)        = 3
open("/etc/hosts", O_RDONLY)            = 3
HOSTNAME=dyna4.home.front

but on x86_64 the same action results in

# strace -e open ipcalc -h 192.168.23.196
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib64/tls/libc.so.6", O_RDONLY)  = 3
open("/etc/popt", O_RDONLY)             = -1 ENOENT (No such file or
directory)
open("/root/.popt", O_RDONLY)           = -1 ENOENT (No such file or
directory)
open("/etc/nsswitch.conf", O_RDONLY)    = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib64/libnss_files.so.2", O_RDONLY) = 3
open("/etc/resolv.conf", O_RDONLY)      = 3
open("/etc/host.conf", O_RDONLY)        = 3
open("/etc/hosts", O_RDONLY)            = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib64/libnss_dns.so.2", O_RDONLY) = 3
open("/lib64/libresolv.so.2", O_RDONLY) = 3
ipcalc: cannot find hostname for 192.168.23.196: Unknown host

It looks like that /etc/hosts is opened but its content discarded.

As a side-effect x86_64 machines with dynamically asigned IP addresses
end up with 'localhost.localdomain' for names.

Version-Release number of selected component (if applicable):
initscripts-7.50-1

How reproducible:
Always
Comment 1 Bill Nottingham 2004-05-04 21:22:36 EDT
Fixed in 7.52-1, *grumble*.

/me goes looking for an RFC to whack someone with

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