Bug 2030534

Summary: Node selector/tolerations rules are evaluated too early
Product: OpenShift Container Platform Reporter: Guohua Ouyang <gouyang>
Component: Console Kubevirt PluginAssignee: Gilad Lekner <glekner>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.10CC: aos-bugs, gouyang, tnisan
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:32:46 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:
Embargoed:
Attachments:
Description Flags
node was found after typing key none

Description Guohua Ouyang 2021-12-09 04:30:03 UTC
Created attachment 1845389 [details]
node was found after typing key

Description of problem:
Node selector/tolerations rules are evaluated too early, the node was found even without input value, without value inputed, the VM is not schedulable. 
The node should only be found after typing key and value.

$ oc describe pod virt-launcher-fedora-k7spt
Events:
  Type     Reason            Age   From               Message
  ----     ------            ----  ----               -------
  Warning  FailedScheduling  15s   default-scheduler  0/6 nodes are available: 1 node(s) had taint {key: test}, that the pod didn't tol
erate, 2 node(s) didn't match Pod's node affinity/selector, 3 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't
 tolerate.


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


How reproducible:


Steps to Reproduce:
1. label a node key=test
2. create a vm and add label in node selector by just adding key.
3. start the vm

Actual results:
node was found by just typing key there.

Expected results:
node was only found by typing key=test.

Additional info:

Comment 3 Guohua Ouyang 2022-01-10 03:02:07 UTC
verified on master

Comment 6 errata-xmlrpc 2022-03-10 16:32:46 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.10.3 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-2022:0056