alip: can't look up localhost.localdomain

Bug #712031 reported by Tom Gall on 2011-02-02
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Linaro
Fix Released
Medium
Tom Gall

Bug Description

BeagleXm, alpha2, alip 20110202

On startup, dialog appears that says:

Could not look up internet address for localhost.localdomain.
This will prevent Xfce from operating correctly.
It may be possible to correct the problem yadda yadda to /etc/hosts

Related branches

Matt Waddel (mwaddel) wrote :

This also happens with the Versatile Express. Adding localhost.localdomain to /etc/hosts does in fact fix the problem.

Steve Langasek (vorlon) on 2011-02-02
Changed in linaro:
status: New → Triaged
importance: Undecided → Medium
Steve Langasek (vorlon) wrote :

I think the real bug here is that /etc/hostname lists 'localhost.localdomain' at all. The canonical, 100% RFC-approved name for 127.0.0.1 is 'localhost', full stop - not 'localhost.localdomain'; localhost.localdomain can be an alias, but that's it.

So whatever is setting /etc/hostname should be fixed.

Note that, according to the live helper config branches, the hostname is supposed to be set to 'linaro', not 'localhost' at all - so we'll need to do some digging to find the culprit.

Steve Langasek (vorlon) wrote :

(and yes, if we fix /etc/hostname to read 'linaro', we will then also need to update /etc/hosts - preferably to map this to 127.0.1.1.)

The default hostname is a separate issue from the fact that localhost isn't defined at all in the default (empty) /etc/hosts.

I don't know if localdomain is defined in any standards anywhere, but apps do expect localhost to be defined.

Dave

On Thu, Feb 03, 2011 at 01:20:26PM -0000, Dr. David Alan Gilbert wrote:
> The default hostname is a separate issue from the fact that localhost
> isn't defined at all in the default (empty) /etc/hosts.

> I don't know if localdomain is defined in any standards anywhere, but
> apps do expect localhost to be defined.

The /etc/hosts I see on first boot does have localhost defined - it does not
have localhost.localdomain defined.

It's possible this is being populated by networkmanager and we need to still
solve this for the headless and developer image types.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Possibly; I've only tried headless and the 11.05 alpha 2 install a couple of days ago still has an empty /etc/hosts

Dave

Tom Gall (tom-gall) on 2011-02-03
Changed in linaro:
assignee: nobody → Tom Gall (tom-gall)
Tom Gall (tom-gall) on 2011-02-16
Changed in linaro:
status: Triaged → In Progress
Tom Gall (tom-gall) wrote :

From network-manager and specifically the Dec 20th 2010 debian/changelog entry :

  * Drop the patch to not write localhost.localdomain in /etc/hosts, it's no
    longer needed now that NM doesn't change the hosts file.
    - delete debian/patches/never-localhostlocaldomain.patch
    - update debian/patches/series

Even then the live helper conf_create.sh with it's " --hostname "$hostname" " setting is being ignored as well.

Rooting around in the live-build source this isn't surprising. If we want to support --hostname in live-build we'll need to add some code. Probably overkill at this point.

Fixing just the /etc/hosts file we can approach it one of two ways.
1) put the patch back into network-manager
2) drop an /etc/hosts file into the binary_local-includes directory of our live helper configs and that'll drop a known good file into place.

#2 might not be as bad of an option as you might think since /etc/hosts and /etc/hostname is really something updated / customized by things like oem-config, not to mention the Contents-armel.gz file does not list hosts as actually being owned by any package.

Steve Langasek (vorlon) wrote :

On Wed, Feb 16, 2011 at 05:33:43AM -0000, Tom Gall wrote:

> * Drop the patch to not write localhost.localdomain in /etc/hosts, it's no
> longer needed now that NM doesn't change the hosts file.
> - delete debian/patches/never-localhostlocaldomain.patch
> - update debian/patches/series

> Even then the live helper conf_create.sh with it's " --hostname
> "$hostname" " setting is being ignored as well.

> Rooting around in the live-build source this isn't surprising. If we
> want to support --hostname in live-build we'll need to add some code.
> Probably overkill at this point.

Well, phooey. Yes, we don't want to get into writing a bunch of new code to
support this, given how far off live-build mainline we already are.

> Fixing just the /etc/hosts file we can approach it one of two ways.
> 1) put the patch back into network-manager
> 2) drop an /etc/hosts file into the binary_local-includes directory of our
> live helper configs and that'll drop a known good file into place.

> #2 might not be as bad of an option as you might think since /etc/hosts
> and /etc/hostname is really something updated / customized by things
> like oem-config, not to mention the Contents-armel.gz file does not list
> hosts as actually being owned by any package.

#2 is the better option; that way we can use the same code path for all of
our images, whether or not they include network-manager.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Jamie Bennett (jamiebennett) wrote :

Agreed, option #2 is the better route.

Tom Gall (tom-gall) on 2011-02-16
Changed in linaro:
status: In Progress → Fix Committed
Tom Gall (tom-gall) on 2011-03-04
Changed in linaro:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers