Description of problem: The virt-template-validator by default is configured with 2 replicas. However, it doesn't have podAntiAffinity configured and the two replicas may get scheduled on the same master node. So if this node goes down, we lose both replicas. Version-Release number of selected component (if applicable): version: v4.9.2 How reproducible: 100% Steps to Reproduce: Actual results: virt-template-validator pods may get scheduled on the same node. Expected results: Configure podAntiAffinity on virt-template-validator so that it will not be scheduled on the same node. Additional info:
checked with iib:219905 virt-template-validator pods are getting scheduled on different nodes "name": "virt-template-validator-7c5bd9985c-d2h47" "nodeName": "virt-akr-411-jpqfs-worker-0-rt6lf" "name": "virt-template-validator-7c5bd9985c-cv58q" "nodeName": "virt-akr-411-jpqfs-worker-0-qtqtv" also podAntiAffinity is configured "spec": { "affinity": { "podAntiAffinity": { "preferredDuringSchedulingIgnoredDuringExecution": [ { "podAffinityTerm": { "labelSelector": { "matchExpressions": [ { "key": "kubevirt.io", "operator": "In", "values": [ "virt-template-validator" ] } ] }, "topologyKey": "kubernetes.io/hostname" }, "weight": 1 } ] } },
(In reply to Akriti Gupta from comment #1) > checked with iib:219905 > > virt-template-validator pods are getting scheduled on different nodes > > "name": "virt-template-validator-7c5bd9985c-d2h47" > "nodeName": "virt-akr-411-jpqfs-worker-0-rt6lf" > > "name": "virt-template-validator-7c5bd9985c-cv58q" > "nodeName": "virt-akr-411-jpqfs-worker-0-qtqtv" > > also podAntiAffinity is configured > [cnv-qe-jenkins@virt-akr-411-jpqfs-executor ~]$ oc get pods virt-template-validator-7c5bd9985c-d2h47 -n openshift-cnv -o json |jq '.spec.affinity' { "podAntiAffinity": { "preferredDuringSchedulingIgnoredDuringExecution": [ { "podAffinityTerm": { "labelSelector": { "matchExpressions": [ { "key": "kubevirt.io", "operator": "In", "values": [ "virt-template-validator" ] } ] }, "topologyKey": "kubernetes.io/hostname" }, "weight": 1 } ] } }
PR for testing virt-template-validator pods are getting scheduled on different nodes is raised here https://code.engineering.redhat.com/gerrit/c/cnv-tests/+/409470
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 (Important: OpenShift Virtualization 4.11.0 Images security and bug fix 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-2022:6526