EC2 hostnames are too long when launching multiple at once

Bug #1203981 reported by Sam Morrison
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
xiaohanyu

Bug Description

When launching multiple instances via ec2 you get hostnames like this:

1: Server <uuid-1>-<uuid-1>
2: Server <uuid-1>-<uuid-2>
3: Server <uuid-1>-<uuid-3>
4: Server <uuid-1>-<uuid-4>

Which turns out to be longer than 64 characters which unix doesn't like.

Tags: ec2
Revision history for this message
Blair Bethwaite (blair-bethwaite) wrote :

This appears to be the result of the new config option (and its impl) in Grizzly: multi_instance_display_name_template. The change in itself looks reasonable, but perhaps the sanity checking of the resulting names is lacking... RFC952, which is referenced in sanitize_hostname, seems to suggest a max of 24 characters if I'm reading it right!

I'm amazed this hasn't been smoked out already. Perhaps points to a lack of functionality tests in OS guests.

tags: added: ec2
Revision history for this message
xiaohanyu (xiaohanyu1988) wrote :
Download full text (4.6 KiB)

My result is(nova version is: commit id 2efcc9dc242c913629ac8f11d9a5223159895f7b):

---
vagrant@precise64:/opt/stack/nova$ euca-run-instances -n 3 --kernel aki-00000001 --ramdisk ari-00000002 -t m1.nano ami-00000003
RESERVATION r-vxmlcq3r d6a264ac5d5f4d2c8757731613f2ecb6 default
INSTANCE i-00000001 ami-00000003 server-f117cc81-37ce-43c7-9b5a-ec483adbb4f9-f117cc81-37ce-43c7-9b5a-ec483adbb4f9 pending None (d6a264ac5d5f4d2c8757731613f2ecb6, None) 0 m1.nano 2013-11-23T12:18:04.000Z nova aki-00000001 ari-00000002 monitoring-disabled instance-store
INSTANCE i-00000002 ami-00000003 server-eb6b2680-47c1-40be-a2f9-0777be26a52e-eb6b2680-47c1-40be-a2f9-0777be26a52e pending None (d6a264ac5d5f4d2c8757731613f2ecb6, None) 1 m1.nano 2013-11-23T12:18:04.000Z nova aki-00000001 ari-00000002 monitoring-disabled instance-store
INSTANCE i-00000003 ami-00000003 server-ff369e37-ed90-47a4-af61-3b32ad2d9d74-ff369e37-ed90-47a4-af61-3b32ad2d9d74 pending None (d6a264ac5d5f4d2c8757731613f2ecb6, None) 2 m1.nano 2013-11-23T12:18:04.000Z nova aki-00000001 ari-00000002 monitoring-disabled instance-store
vagrant@precise64:/opt/stack/nova$ nova list
+--------------------------------------+----------------------------------------------------------------------------------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+----------------------------------------------------------------------------------+--------+------------+-------------+----------+
| eb6b2680-47c1-40be-a2f9-0777be26a52e | Server eb6b2680-47c1-40be-a2f9-0777be26a52e-eb6b2680-47c1-40be-a2f9-0777be26a52e | BUILD | spawning | NOSTATE | |
| f117cc81-37ce-43c7-9b5a-ec483adbb4f9 | Server f117cc81-37ce-43c7-9b5a-ec483adbb4f9-f117cc81-37ce-43c7-9b5a-ec483adbb4f9 | BUILD | spawning | NOSTATE | |
| ff369e37-ed90-47a4-af61-3b32ad2d9d74 | Server ff369e37-ed90-47a4-af61-3b32ad2d9d74-ff369e37-ed90-47a4-af61-3b32ad2d9d74 | BUILD | spawning | NOSTATE | |
+--------------------------------------+----------------------------------------------------------------------------------+--------+------------+-------------+----------+
vagrant@precise64:/opt/stack/nova$ euca-run-instances -n 1 --kernel aki-00000001 --ramdisk ari-00000002 -t m1.nano ami-00000003
RESERVATION r-ftp1h615 d6a264ac5d5f4d2c8757731613f2ecb6 default
INSTANCE i-00000004 ami-00000003 server-2641d405-799b-45eb-b491-a589888be72d pending None (d6a264ac5d5f4d2c8757731613f2ecb6, None) 0 m1.nano 2013-11-23T12:18:43.000Z nova aki-00000001 ari-00000002 ...

Read more...

Changed in nova:
assignee: nobody → xiaohanyu (xiaohanyu1988)
Chuck Short (zulcss)
Changed in nova:
status: New → Confirmed
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Should have been already fixed. please reopen if necessary.

Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.