Ask Your Question
0

How Anti-Affinity Place the VMs if number of cluster VMs are More than compute nodes?

asked 2020-03-02 14:34:16 -0500

Asif.Janjua gravatar image

We have 4 compute nodes and have enabled anti-affinity policy. I would like to create a 6 VMs with anti-affinity policy. In this case how these 6 VMs will be distributes to 4 compute nodes?

Two compute nodes will have 4 VMs, each with two VMs and remaining two compute node will have one VM on each of them?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2020-03-02 19:37:43 -0500

updated 2020-03-03 00:30:00 -0500

I have no experience with this, but had a look at the code. If I understand it right, by default a single server is allowed on a host, so that in your case a server group can only have 4 servers.

However, starting with microversion 2.64 the server group creation API includes an option max_server_per_host. It doesn't look like the openstack client allows you to set this option, unfortunately.

The API description has an example JSON structure that sets max_server_per_host.

edit flag offensive delete link more
0

answered 2020-03-03 06:06:08 -0500

Salman Khan gravatar image

Depending upon the max_server_per_host parameter set in the nova, with 1 per host only 4x servers will be scheduled on the 4x host while the rest will complain about the "No Valid Host" since no more host are left to be hosted.

edit flag offensive delete link more
0

answered 2020-03-03 00:16:05 -0500

Asif.Janjua gravatar image

@Bernad Baush, Yes you are right that single server is allowed in host by default. I have found below article and its has a explanation in detail ( refer to important notes at end in this article ).

https://dev.cloudwatt.com/en/blog/affinity-and-anti-affinity-in-openstack.html (https://dev.cloudwatt.com/en/blog/aff...)

You may also change the default limit of max_server_per_host on hosts. Refer to the below article: https://specs.openstack.org/openstack/nova-specs/specs/rocky/implemented/complex-anti-affinity-policies.html (https://specs.openstack.org/openstack...)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2020-03-02 14:34:16 -0500

Seen: 39 times

Last updated: Mar 03

Related questions