ec2-images have ubuntu.canonical.com in /etc/hosts

Bug #440757 reported by Scott Moser on 2009-10-02
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)
Medium
Scott Moser
Karmic
Medium
Scott Moser

Bug Description

-----BEGIN PGP SIGNED MESSAGE-----
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
127.0.0.1 localhost
127.0.1.1 ubuntu.canonical.com ubuntu

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

iEYEARECAAYFAkrGQHAACgkQDZzbdwr3wEfG5gCfSTj/TYWWlE85cP0m7CNIBMzY
WysAnRFTpCRYWcw0mW8dfRZ6PHhkSHB3
=NfW4
-----END PGP SIGNATURE-----

Matt Zimmerman (mdz) on 2009-10-06
Changed in vm-builder (Ubuntu):
status: Confirmed → Triaged
Scott Moser (smoser) on 2009-10-06
Changed in vm-builder (Ubuntu Karmic):
assignee: nobody → Scott Moser (smoser)
milestone: none → ubuntu-9.10
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 127.0.1.1 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
VMBuilder/plugins/libvirt/__init__.py
VMBuilder/plugins/ubuntu/dapper.py
VMBuilder/plugins/virtualbox/vm.py
VMBuilder/plugins/vmware/vm.py

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

Changed in vm-builder (Ubuntu Karmic):
status: Triaged → In Progress
Scott Moser (smoser) wrote :

This is fixed in automated ec2 builds . The 20091013.1 build (http://uec-images.ubuntu.com/karmic/20091013.1) should have it, as well as all subsequent builds.

Changed in vm-builder (Ubuntu Karmic):
status: In Progress → Fix Released
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.

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