← Back to team overview

openstack team mailing list archive

Re: boot multi instances at a time issue

 

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



References