[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: localhost.localdomain

On Thu, Oct 06, 2005 at 07:44:42PM +0200, Pierre Machard wrote:

> I can not remember precisely. I think that at that time I was testing the
> debian-installer and I saw it was taken a long while to boot. I saw
> that my system had no FQDN (hostname -f). When you add .localdomain, the
> FQDN is complete and it helps to solve timeout in several application.

So it was just papering over a real bug, namely the existence of the
"-f" option of hostname. "hostname -f" assumes that the hostname (as
returned by gethostname(3)) has something to do with networking, which
is false. It also assumes that the system has just one IP address with
one FQDN which is also false.

This is a perfect example of a long-standing assumption that was wrong
from the start but tended to work in the past when the wast majority of
computers had really just one network interface with one IP address, and
the few machines having multiple NICs/multiple IP addresses had good
sysadmins who could deal with the breakage caused by this assumption.

Nowadays even desktop boards start to come with multiple NICs on-board
so this "one IP - one FQDN" assumption must be stopped. "hostname -f"
must be killed, and everything that uses it must be fixed. Well, it may
take some time to sort out all the details, there are a _lot_ of broken
programs out there...

> Anyway I do not understand why this issue is a problem since we
> simply add an alias to localhost. Nobody say  that we will remove 
> localhost and exchange it by localhost.localdomain.

Broken software compares reverse_lookup({}) with the string
"localhost" and is surprised when it gets FALSE due to the reverse
lookup returning "localhost.localdomain" instead of just "localhost".


     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences

Reply to: