[Openstack] boot multi instances at a time issue

Jay Pipes jaypipes at gmail.com
Wed Jan 2 16:15:45 UTC 2013


On 01/02/2013 12:52 AM, heut2008 wrote:
> Hi,all
> 
>  When booting  multi instances at a time , we face a hostname  naming 
> problem, now  all instances will using the same hostname provideed at
> booting time,as a developer,I  am looking for suggestions and
> requirements that from the user side, how do you want nova naming
> the hostname when booting multi instances? 
> when provide a hostname at booting time ,is  adding a number suffix ok?
> or more configurable naming is needed.

I believe the API should be modified to make suffix/templatized names
possible, as well as the ability to specify names as a list, with each
name in the list of names corresponding to a server.

Let's say I want to create 20 instances, with instances names
"instance-00" through "instance-19". Of course, there isn't any way to
do this right now, since the name parameter of the createServer call
sets the name the same for all instances. We could add a new parameter
called nameTemplate that would be filled in with some easy rules:

* Replace %(launch_id)d with the launch sequence. So, the third instance
booted with a nameTemplate of "instance-%(launch_id)d" would get the
name "instance-3"
* Replace %(image_name)s with the name of the image. For example, if the
nameTemplate was "%(image_name)s-%(launch_id)d" and the name of the
image was "UbuntuPrecise", then the third launched instance would be
named "UbuntuPrecise-3"
* Any other sensible rules one might want to give...

-jay





More information about the Openstack mailing list