Score:0

How to have node affinity in openstack?

ng flag

For Example, I have 3 Compute servers and I want to have 1 Specific Instance on each of them and I want to have Node Affinity on them.

  • instance_1 --> compute_node_1 (Always on this node)
  • instance_2 --> compute_node_2 (Always on this node)
  • instance_3 --> compute_node_3 (Always on this node)

I know there is a "Senlin" service. But how to use it exactly? Or if there is another solution?

Score:1
us flag

You don't need Senlin. You can create a server group with an anti-affinity policy (i.e. a policy that spreads servers over compute nodes), then launch your instances in that group.

The Nova-Scheduler anti-affinity filter must be enabled. Note that there is no guarantee that instances are scheduled in the desired way; for example, if a compute node has no capacity left, it won't be used.

See https://docs.openstack.org/nova/victoria/admin/configuration/schedulers.html#servergroupantiaffinityfilter for details.

There is another option: In one of the recent Nova releases (Xena, Wallaby or Victoria), it has become possible for an admin to ask for a specific compute node when launching an instance. Please see the release notes for more detail.

Score:1
cn flag
Bob

Don’t.

You should not use a cloud platform when you want to treat your compute instances and hypervisors as old fashioned legacy IT and try to get load/VM’s to behave completely deterministic.

Having said that :

The normal method open to an OpenStack tenant: a server group with an anti affinity rule, will ensure that, load permitting , the scheduler will ensure that their compute instances run on different hypervisors.

As an OpenStack administrator you can place each hypervisor in its own availability zone. The tenant can then place their compute instances in specific AZ’s to create an even stronger separation than an anti affinity rule would be able to achieve.

I’m unfamiliar with Senlin

Milad Jahandideh avatar
ng flag
Thank you, We need this for monitoring purposes. We need to have a small Instance on each node to have some tests regularly. We have other monitoring systems but this one is for seeing problems from the user's pov.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.