How to configure the worker and infra nodes to be distributed across hosts (with soft-anti-affinity) on IPI in OpenShift Platform 4.5 on top of Red Hat OpenStack Platform

Solution In Progress - Updated -

Issue

By default in OpenShift 4.5, masters are evenly distributed across hosts (using soft anti-affinity).

For workers, required to add the ServerGroupName or ServerGroupID (if you need to be more specific) to the MachineSet. And create a server group with that name / ID and associate it with the affinity policy to make it available to workers.

As a result, workers are evenly distributed among the hosts.

Original:
- This is a example result of Stock 4.5 without setting affinity policy. There are 3 masters (Ma, Mb, Mc) and 3 workers (W1, W2, W3) on each nodes.

  Host1: Ma, W1, W2
  Host2: Mc, W3
  Host3: Mb

With Affinity setting:
- Setting the affinity policy and re-distribute with ServerGroupName: my-workers as follows.

  Host1: Mc, W1
  Host2: Ma, W3
  Host3: Mb, W2 

The ServerGroupName property of the MachineSet will create a server group with soft-anti-affinity. If they want more guarantees, they can manually create a server group with another policy (eg anti-affinity) and paste its name in ServerGroupName (or its UUID in ServerGroupID). If it exists already, it will be reused and not created.

However, the current documentation does not explained them in detail.

Environment

  • Red Hat OpenShift Container Platform 4.5
  • Red Hat OpenStack Platform 16

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content