Bug 464191

Summary: anaconda, hostname and /etc/hosts
Product: [Fedora] Fedora Reporter: Thomas Woerner <twoerner>
Component: anacondaAssignee: Dave Cantrell <dcantrell>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: anaconda-maint-list, dcantrell
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-30 14:01:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 446449    
Attachments:
Description Flags
One way to fix this.
none
Fixed version of patch. none

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 Dave 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.