Red Hat Bugzilla – Bug 464191
anaconda, hostname and /etc/hosts
Last modified: 2008-09-30 10:01:11 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):
Steps to Reproduce:
2. Use a hostname without a domain (no FQDN), which is resolvable while installing
"A.B.C.D <hostname>" in /etc/hosts, which is not resolvable
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
Patch added to git repo, will be in the next build of anaconda. Thanks.
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
Applied the newer patch. Thanks for the update.