We want the installer to have the following behavior: 1.Default: Create 2 unique affinity groups with a soft negative affinity rule: - ovirt11-l6hq2-controlplane - contain the masters only and have a higher priority(5). - ovirt11-l6hq2-cluster - contain all the machines the installer will create, priority(3). 2. No Affinity groups: To not create any AffinityGroups the user needs to have an empty field on the install config for the control plain and compute nodes Like: ```yaml compute: - architecture: amd64 name: worker platform: ovirt: ... memoryMB: 16000 affinityGroups: [] ... controlPlane: ... platform: ovirt: ... memoryMB: 16000 affinityGroups: [] ... ``` 3. Customize created affinity Groups: The user can change the affinity groups names/priority or add more/less by editing the affinityGroups field, for example: ```yaml compute: - architecture: amd64 name: worker platform: ovirt: ... memoryMB: 16000 affinityGroups: - name: bla1 priority: 1.0 - name: bla2 priority: 2.0 ... controlPlane: ... platform: ovirt: ... memoryMB: 16000 affinityGroups: - name: bla3 priority: 3.0 - name: bla4 priority: 4.0 ... ``` ** NOTE: All affinity groups that are created by the installer will have soft negative affinity rules How to reproduce/test: 1. regular flow: 1.1 Install an OCP cluster with questions or with customizations but *dont* add any affinityGroupsNames field to the install config expected outcome: 2 affinity groups are created with soft negative affinity rule with the names {cluster-name}-cluster and {cluster-name}-ocp-controlplane only masters are on {cluster-name}-ocp-masters and all the machines are on {cluster-name}-ocp {cluster-name} -ocp-masters have higher priority then {cluster-name}-ocp 1.2 destroy the cluster expected outcome: affinity group should be removed 2. no affinity groups flow: 2.1 Install an OCP cluster with customizations and leave the affinityGroupsNames empty on compute and controlPlane expected outcome: cluster is installed and no affinity groups are created 2.2 destroy the cluster expected outcome: cluster is removed with no errors 3. create custom affinity groups: 3.1 Install an OCP cluster with customizations and add affinity groups that you created in advance to the affinityGroupsNames field expected outcome: cluster is installed and the machines should be added to the corresponding affinity groups 3.2 destroy the cluster expected outcome: affinity group should not be removed
need to check also this scenario: based on the state of the cluster. i.e., a three node cluster, but one of the nodes is in maintenance mode? Probably a few other edge cases like, a host goes into maintenance mode whilst the cluster is being created. Is that something we can handle.
check 3 scenarios maintenance host doesn't support in Affinity Group
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:2438