ec2-images have in /etc/hosts

Bug #440757 reported by Scott Moser
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)
Scott Moser
Scott Moser

Bug Description

Hash: SHA1

bug 407861 brought up this issue, but we never opened another bug to
address it.

The following is present on an ec2-image out of the box:
$ grep 127. /etc/hosts localhost ubuntu

 affects ubuntu/vm-builder
 tag ec2-images uec-images
 status confirmed
 importance medium
 subscribe Eric Hammond
Version: GnuPG v1.4.9 (GNU/Linux)


Matt Zimmerman (mdz)
Changed in vm-builder (Ubuntu):
status: Confirmed → Triaged
Scott Moser (smoser)
Changed in vm-builder (Ubuntu Karmic):
assignee: nobody → Scott Moser (smoser)
milestone: none → ubuntu-9.10
Revision history for this message
Scott Moser (smoser) wrote :

I really don't feel like fixing this correctly in vmbuilder at the moment. Doing so I think would be to either:
a.) add a '--no-local-host-entry' like field
b.) allow '--host' to be 'null' or 'unset' special case. On that, the entry would not be written.

Neither of those are trivial. The reason for this is that the values populated into /etc/hosts come from the '--hostname' and '--domain' arguments. --hostname (vm.hostname) is used:

$ grep vm.hostname -r * -l

So, I'm planning on removing the entry in a '--execscript' script that will be pasted from build-ec2-image

Changed in vm-builder (Ubuntu Karmic):
status: Triaged → In Progress
Revision history for this message
Scott Moser (smoser) wrote :

This is fixed in automated ec2 builds . The 20091013.1 build ( should have it, as well as all subsequent builds.

Changed in vm-builder (Ubuntu Karmic):
status: In Progress → Fix Released
Revision history for this message
Eric Hammond (esh) wrote :

Scott: Since you're solving this with an exec script, could you also remove the incorrect /etc/hostname file while you're at it?

Even though I haven't found any standard packages which depend on /etc/hostname it still bugs me to have an incorrect value stored there by default.

Revision history for this message
Scott Moser (smoser) wrote :

I'd really prefer to just leave /etc/hostname as it is right now. We don't have any known issues with having that, and as Soren said in Comment 1 for bug 407861 it makes some things easier.

I think this is probably the same situation that many desktop systems have. When you do the install, it asks you for a hostname. You enter one, and then you get an IP address from some router-gateway system, that doesn't necessarily match up with what you entered.

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