Bug 2093852 - Affinity rule created in console deployment for single-replica infrastructure
Summary: Affinity rule created in console deployment for single-replica infrastructure
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.11
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.12.0
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
Depends On:
Blocks: 2111037
TreeView+ depends on / blocked
Reported: 2022-06-06 08:33 UTC by Jakub Hadvig
Modified: 2023-01-17 19:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2023-01-17 19:49:30 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console-operator pull 657 0 None open Bug 2093852: InfrastructureTopology must be driving console affinity rule creation 2022-06-06 08:36:47 UTC
Red Hat Product Errata RHSA-2022:7399 0 None None None 2023-01-17 19:49:50 UTC

Description Jakub Hadvig 2022-06-06 08:33:08 UTC
Description of problem:
Console operator erroneously creates console deployment with an affinity rule when running in a cluster with HA control plane (ControlPlaneTopology=="HighlyAvailable"/"External") and non-HA infrastructure plane (InfrastructureTopology=="SingleReplica").

Version-Release number of selected component (if applicable):

How reproducible:
To reproduce the issue, create an OCP cluster with 3 control plane nodes and 1 worker node. Console deployment will have non-empty affinity clause, even though the number of console replicas is 1:
kind: Deployment
apiVersion: apps/v1
  name: console
  replicas: 1
            - labelSelector:
                  - key: component
                    operator: In
                      - ui
              topologyKey: kubernetes.io/hostname

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
This issue causes console deployment updates to stall because new console replica will not start on the same single worker node due to the anti-affinity rule.

Comment 1 Jakub Hadvig 2022-06-06 08:34:42 UTC
Created from https://github.com/openshift/console-operator/issues/656

Comment 4 Yadan Pei 2022-07-20 02:21:41 UTC
PR was merged 6 days ago against openshift/master branch, it should be included in 4.12

Comment 6 Yadan Pei 2022-07-26 01:58:11 UTC
Create a SNO cluster

$ oc get infrastructure cluster -o json | jq .status.infrastructureTopology
$ oc get infrastructure cluster -o json | jq .status.controlPlaneTopology 
$ oc get deployment console -n openshift-console -o json | jq .spec.template.spec.affinity
$ oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.12.0-0.nightly-2022-07-25-122035   True        False         26m     Cluster version is 4.12.0-0.nightly-2022-07-25-122035

we can see console deployment has empty affinity, verified on 4.12.0-0.nightly-2022-07-25-122035

Comment 9 errata-xmlrpc 2023-01-17 19:49:30 UTC
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.12.0 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.


Note You need to log in before you can comment on or make changes to this bug.