[sdk]: compute service create_server method, how to create multiple servers

Sean Mooney smooney at redhat.com
Mon Apr 12 13:46:59 UTC 2021



On 12/04/2021 14:33, Mohammed Naser wrote:
> Hi Catherine,
>
> Have a look at min_count option :)
min_count is what you want yes altough nova generally discuorages use fo 
our server multi create feature and advise peopel to make multiple 
independent boot calls instead.
the cageate to that is if you are using server groups and affinity or 
anti affinity.
in that case multi create makes sense to use but if you can boot them 
serially in seperate boot requsts that is generally better.

if you ask for min_count 4 and 3 boot successfully and the 4th fails we 
will remove all 4 instances and set them to error that is not necessary 
the behaviour your want
so you should really orchestrate this your self and not realy on the 
basic support in nova if you want anything more complex.

>
> Thanks
> Mohammed
>
> On Fri, Apr 9, 2021 at 5:12 PM dmeng <dmeng at uvic.ca> wrote:
>> Hello there,
>>
>> Hope this email finds you well.
>>
>> We are currently using the openstacksdk for developing our product, and have a question about the openstacksdk compute service create_server() method. We are wondering if the "max_count" attribute is supported by the create_server() method? We tried to create multiple servers by setting the max_count value, but only one server has been created.
>>
>> While when we use the python-novaclient package, novaclient.servers.create() method has the attribute max_count which allows creating multiple servers at once if set the value. So we would like to know is there a similar attribute like "max_count" that could allow us to create multiple servers at once in openstacksdk?
>>
>> Thanks and have a great day!
>>
>> Catherine
>
>




More information about the openstack-discuss mailing list