Description of problem: When an affinity rule is added and removed, the VM fails to be scheduled. Events read the following error: Error creating pod: Pod "virt-launcher-vm-example3-vsfg7" is invalid: spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms: Required value: must have at least one node selector term The problem is in leaving the folling in the VM manifest: spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: [] podAffinity: {} podAntiAffinity: {} Afther removing the affinity-related keys, VM schedules as expected. Version-Release number of selected component (if applicable): OCP 4.5 CNV 2.3 (2.4 is blocked ATM) How reproducible: 100%
Verified in console release-4.5 branch commit: 5994c64ee529b650bae348ef78ebc23dca8db5c5
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, 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/RHBA-2020:2409