Bug 483244 - setup package doesn't create /etc/hosts
setup package doesn't create /etc/hosts
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: setup (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
: 486457 (view as bug list)
Depends On:
Blocks: FedoraServerTracker
  Show dependency treegraph
 
Reported: 2009-01-30 09:07 EST by Daniel Mach
Modified: 2009-02-26 07:40 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-26 07:40:56 EST
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 Daniel Mach 2009-01-30 09:07:44 EST
/etc/hosts is created by anaconda during installation.
I'd prefer to have a default file with localhost and localhost6 records.

Could you include /etc/hosts with following content?
127.0.0.1       localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
Comment 1 Allen Kistler 2009-02-20 09:15:00 EST
See Bug 486461 and Bug 486457.

I'd suggest the contents of /etc/hosts should be
127.0.0.1       localhost.localdomain localhost
::1             localhost.localdomain localhost

for reasons discussed in those bugs.
Comment 2 Daniel Mach 2009-02-20 12:04:17 EST
(In reply to comment #1)
> See Bug 486461 and Bug 486457.
> 
> I'd suggest the contents of /etc/hosts should be
> 127.0.0.1       localhost.localdomain localhost
> ::1             localhost.localdomain localhost
> 
> for reasons discussed in those bugs.

Do you have any special reason for that?

::1             localhost6.localdomain6 localhost6
is a standard /etc/hosts record in Fedora.
It's created by anaconda during installation.
Comment 3 Allen Kistler 2009-02-20 14:14:20 EST
localhost6 breaks IPv6 functionality.  Probably the only reason I haven't seen it pointed out before is that people still use IPv4 mostly, even when they're dual-stacked.

Applications refer to the loopback as localhost, which needs to be true independent of address family.  Bug 486457 is the request to get anaconda to create /etc/hosts as described in Comment #1 above.  I know localhost6 is the current Fedora practice (I doubt it's as formal as a standard), but the practice needs to be changed.

The idea is to make IPv6 work out of the box.

FWIW, Gentoo appears (according searches I've done) to do something like
127.0.0.1 localhost localhost4
::1       localhost localhost6

which would also work, since the important thing is that localhost is *both* an IPv4 address *and* an IPv6 address for the loopback.  Although it has a nice symmetry to it, I'd discourage the existence of localhost4 as much I would discourage localhost6.  Having just localhost is the "right" thing, but more importantly it works and localhost6 doesn't.
Comment 4 Ondrej Vasik 2009-02-25 11:33:14 EST
Ok, discussed a bit with reporter and I'll probably do following soon:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1       localhost localhost.localdomain localhost6 localhost6.localdomain6

and multi on in /etc/host.conf

It should make IPv6-only machines work out-of-the-box and without modifications of configuration files and should grant backward compatibility - as there already exists localhost6.localdomain6 in some configuration files in Fedora.
Comment 5 Allen Kistler 2009-02-25 12:53:11 EST
*** Bug 486457 has been marked as a duplicate of this bug. ***
Comment 6 Ondrej Vasik 2009-02-26 07:40:56 EST
Creating /etc/hosts with content described in comment #4, built as
setup-2.8.1-1.fc11, closing RAWHIDE

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