Since 4.8, both the console pods and downloads pods in the openshift-console namespace have anti-affinity rules. They both use label selector `app=console`, however, which means that the downloads pods have anti-affinity with the console pods and vice versa. We should have more specific selectors so that downloads pods only have anti-affinity with other downloads pods and console pods only have anti-affinity with other console pods. This will be required if we switch the anti-affinity rules to use a hard requirement `requiredDuringSchedulingIgnoredDuringExecution` rather than the current soft requirement `preferredDuringSchedulingIgnoredDuringExecution` since one of the pods would fail to schedule on a cluster with 3 masters.
Still valid. PR up and in merge process.
$ oc get deployment console -o json | jq .spec.template.spec.affinity { "podAntiAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": [ { "labelSelector": { "matchExpressions": [ { "key": "component", "operator": "In", "values": [ "ui" ] } ] }, "topologyKey": "kubernetes.io/hostname" } ] } } $ oc get deployment downloads -o json | jq .spec.template.spec.affinity { "podAntiAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": [ { "labelSelector": { "matchExpressions": [ { "key": "component", "operator": "In", "values": [ "downloads" ] } ] }, "topologyKey": "kubernetes.io/hostname" } ] } } $ oc get pods --show-labels NAME READY STATUS RESTARTS AGE LABELS console-7f9574c678-rjxqr 1/1 Running 0 3h32m app=console,component=ui,pod-template-hash=7f9574c678 console-7f9574c678-z8kc4 1/1 Running 0 3h32m app=console,component=ui,pod-template-hash=7f9574c678 downloads-7d9df5cb76-s7fs4 1/1 Running 0 3h34m app=console,component=downloads,pod-template-hash=7d9df5cb76 downloads-7d9df5cb76-zmhmp 1/1 Running 0 3h34m app=console,component=downloads,pod-template-hash=7d9df5cb76 download and console pods now have more specific labels "component=downloads/ui", console and downloads deployment have more precise anti-affinity rules Verified on 4.9.0-0.nightly-2021-07-18-155939
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.9.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. https://access.redhat.com/errata/RHSA-2021:3759