Bug 1835603

Summary: VM fails to be scheduled after adding and removing affinity rule
Product: OpenShift Container Platform Reporter: Radim Hrazdil <rhrazdil>
Component: Console Kubevirt PluginAssignee: Yaacov Zamir <yzamir>
Status: CLOSED ERRATA QA Contact: Radim Hrazdil <rhrazdil>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, yzamir
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:38:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Radim Hrazdil 2020-05-14 07:36:36 UTC
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:
            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:

Comment 3 Radim Hrazdil 2020-05-20 11:39:43 UTC
Verified in console release-4.5 branch commit: 5994c64ee529b650bae348ef78ebc23dca8db5c5

Comment 4 errata-xmlrpc 2020-07-13 17:38:49 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.