[sdk]: compute service create_server method, how to create multiple servers
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
Hi Catherine, Have a look at min_count option :) Thanks Mohammed On Fri, Apr 9, 2021 at 5:12 PM dmeng <dmeng@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
-- Mohammed Naser VEXXHOST, Inc.
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.
On 12/04/2021 14:33, Mohammed Naser wrote: 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@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
participants (3)
-
dmeng
-
Mohammed Naser
-
Sean Mooney