Bug 464191 - anaconda, hostname and /etc/hosts
anaconda, hostname and /etc/hosts
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: F10Preview
  Show dependency treegraph
 
Reported: 2008-09-26 12:08 EDT by Thomas Woerner
Modified: 2008-09-30 10:01 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-30 10:01:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
One way to fix this. (3.15 KB, patch)
2008-09-26 12:08 EDT, Thomas Woerner
no flags Details | Diff
Fixed version of patch. (3.28 KB, patch)
2008-09-30 06:05 EDT, Thomas Woerner
no flags Details | Diff

  None (edit)
Description Thomas Woerner 2008-09-26 12:08:43 EDT
Created attachment 317806 [details]
One way to fix this.

Description of problem:
While installing the system, anaconda is asking for a hostname. If you enter a FQDN here, then all is alright, but if you do not enter a FQDN, then you get into a name resolving problem e.g. with sendmail. sendmail gets started before the network connection is up and therefore no name resolution is possible. sendmail will try to resolve the non-FQDN entry in /etc/hosts, but will fail. This takes some time, which is delaying the boot process.

Version-Release number of selected component (if applicable):
anaconda-11.4.1.38-1

How reproducible:
Always

Steps to Reproduce:
1. Install
2. Use a hostname without a domain (no FQDN), which is resolvable while installing
  
Actual results:
"A.B.C.D <hostname>" in /etc/hosts, which is not resolvable

Expected results:
Either: "A.B.C.D <fqdn> <hostname>"
or: "127.0.0.1 localhost.localdomain localhost [<fqdn>] <hostname>"
or: hostname and fqdn not used in /etc/hosts at all

Additional info:
Comment 1 David Cantrell 2008-09-29 14:30:39 EDT
Patch added to git repo, will be in the next build of anaconda.  Thanks.
Comment 2 Thomas Woerner 2008-09-30 06:05:44 EDT
Created attachment 318055 [details]
Fixed version of patch.

The old patch has two bugs:
- traceback if fqdn does not contain ".": socket.getfqdn returns given name if it is not resolvable
- use of hostname instead of self.hostname for fqdn finding
Comment 3 Chris Lumens 2008-09-30 10:01:11 EDT
Applied the newer patch.  Thanks for the update.

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