Bug 1893646

Summary: [HCO] Pod placement configuration - dry run is not performed for all the configuration stanza
Product: Container Native Virtualization (CNV) Reporter: Igor Bezukh <ibezukh>
Component: InstallationAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: Satyajit Bulage <sbulage>
Severity: unspecified Docs Contact:
Priority: high    
Version: 2.5.0CC: cnv-qe-bugs, irose, stirabos
Target Milestone: ---Keywords: EasyFix
Target Release: 2.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hco-bundle-registry-container-v2.6.0-272 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-10 11:18:59 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
Description of the HCO YAML after wrong configuration was applied
none
Wrong pod placement configuration
none
HCO CR status none

Description Igor Bezukh 2020-11-02 09:49:29 UTC
Created attachment 1725717 [details]
Description of the HCO YAML after wrong configuration was applied

Description of problem:
It is possible to provide in incorrect configuration of pod placement to the HCO CR. The configuration will be applied successfully although it will be denied by the Kubevirt API. Attached is the wrong configuration. The root cause may be that only the "worloads" stanza is being validated with a dry run while the "infra" stanza doesn't. 

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

How reproducible:
100%

Steps to Reproduce:
1. Apply the attached configuration of the pod placement.
2. Observe the status of the HCO operator using "oc get hco -oyaml".



Actual results:
HCO CR dry run passed successfully. Kubevirt API denied the update.


Expected results:
Dry run should fail incorrect configuration provided to the HCO CR by the user.



Additional info:
In the attached example the wrong part of the configuration is the "Equal" operand which doesn't exists.

Comment 1 Igor Bezukh 2020-11-02 09:52:02 UTC
Created attachment 1725718 [details]
Wrong pod placement configuration

Comment 2 Igor Bezukh 2020-11-02 09:52:37 UTC
Created attachment 1725719 [details]
HCO CR status

Comment 3 Simone Tiraboschi 2020-11-02 11:20:14 UTC
It's an EasyFix but definitely not a blocker:
the user error will be pretty visible to the user that can simply edit again the CR to fix it.
Let's target this to 2.5.1.

Comment 10 errata-xmlrpc 2021-03-10 11:18:59 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 Virtualization 2.6.0 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-2021:0799