Hostname not set correctly on UEC cloud due to IP address in local-hostname manifest data (DNS)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Eucalyptus |
Fix Released
|
Undecided
|
chris grzegorczyk | ||
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Scott Moser | ||
Karmic |
Invalid
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Medium
|
Scott Moser | ||
ec2-init (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Karmic |
Fix Released
|
Medium
|
Thierry Carrez | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned | ||
eucalyptus (Ubuntu) |
Fix Released
|
Wishlist
|
Unassigned | ||
Karmic |
Won't Fix
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
UEC images use the local-hostname setting of the manifest data to set the hostname. On Eucalyptus that appears to be set to the local ip address - which doesn't work properly as the hostname obviously stops at the first period it sees.
Hence you have a lot of machines starting up with hostname '172'...
Additionally /etc/hostname isn't altered by the ec2-init processes.
The default hostname in the manifest data should probably be a combination of the availability zone name (clusterid) and the local/public ip address as appropriate.
so local-hostname should be for example: isp-lab-172-19-1-30 and public-hostname should be isp-lab-10-99-67-9
ProblemType: Bug
.etc.eucalyptus
Architecture: amd64
Date: Thu Nov 5 11:25:12 2009
DistroRelease: Ubuntu 9.10
Package: eucalyptus-cc 1.6~bzr931-0ubuntu7
ProcEnviron:
LANG=en_GB.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: eucalyptus
Uname: Linux 2.6.31-14-server x86_64
=== Begin SRU Information [ec2-init] ===
- impact on users: When running an instance of UEC image under Eucalyptus, hostname is set to '172' or whatever is the first token of the IP address. This means that all your instances have seemingly the same hostname.
- how the bug has been addressed: Instead of blindly calling 'hostname' with the contents of the metadata services 'local-hostname', the code now checks to see if that appears to be a ipv4 address. If it is an ipv4 address, the hostname is set to 'ip-W-X-Y-Z" where WXYZ are values from the IP address.
- patch is available at: http://
- regression pottential:
The regression potential should be fairly low because the test for "is this an IPV4 address" is conservative. The check makes makes sure that a.) there are 4 pieces of the hostname when split on '.', b.) each of the pieces is an integer greater than 0 and less than 255. If both of those conditions are not met, the old path is taken.
TEST CASE:
- start karmic ec2/uec instance in UEC
- ssh to instance, run 'hostname'. Given an IP address of 172.1.2.15, failure will show "172". With the fix in place, it will show 'ip-172-1-2-15'.
=== End SRU Information ===
Changed in eucalyptus (Ubuntu): | |
status: | Incomplete → Triaged |
Changed in eucalyptus (Ubuntu Lucid): | |
importance: | Medium → High |
summary: |
Hostname not set correctly on UEC cloud due to IP address in local- - hostname manifest data + hostname manifest data (DNS) |
Changed in ec2-init (Ubuntu Lucid): | |
status: | Invalid → Triaged |
Changed in eucalyptus (Ubuntu Lucid): | |
importance: | High → Wishlist |
milestone: | lucid-alpha-3 → ubuntu-10.04 |
Changed in eucalyptus: | |
status: | Invalid → In Progress |
Changed in ec2-init (Ubuntu Lucid): | |
status: | New → Fix Released |
Changed in cloud-init (Ubuntu Karmic): | |
status: | New → Won't Fix |
Changed in eucalyptus (Ubuntu Karmic): | |
status: | New → Won't Fix |
description: | updated |
Changed in cloud-init (Ubuntu Karmic): | |
status: | Won't Fix → Invalid |
description: | updated |
Changed in ec2-init (Ubuntu Karmic): | |
assignee: | nobody → Scott Moser (smoser) |
importance: | Undecided → Medium |
milestone: | none → karmic-updates |
status: | New → Fix Committed |
Changed in ec2-init (Ubuntu Karmic): | |
assignee: | Scott Moser (smoser) → Thierry Carrez (ttx) |
status: | Fix Committed → In Progress |
Changed in eucalyptus: | |
status: | Fix Committed → Fix Released |
I think this might be more of a problem with ec2-init.
Regards
chuck