Bug 464191 - anaconda, hostname and /etc/hosts
Summary: anaconda, hostname and /etc/hosts
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F10Preview
TreeView+ depends on / blocked
 
Reported: 2008-09-26 16:08 UTC by Thomas Woerner
Modified: 2008-09-30 14:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-09-30 14:01:11 UTC
Type: ---
Embargoed:


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

Description Thomas Woerner 2008-09-26 16:08:43 UTC
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 18:30:39 UTC
Patch added to git repo, will be in the next build of anaconda.  Thanks.

Comment 2 Thomas Woerner 2008-09-30 10:05:44 UTC
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 14:01:11 UTC
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.