Bug 1893646 - [HCO] Pod placement configuration - dry run is not performed for all the configuration stanza
Summary: [HCO] Pod placement configuration - dry run is not performed for all the conf...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Installation
Version: 2.5.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: 2.6.0
Assignee: Simone Tiraboschi
QA Contact: Satyajit Bulage
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-02 09:49 UTC by Igor Bezukh
Modified: 2021-03-10 11:19 UTC (History)
3 users (show)

Fixed In Version: hco-bundle-registry-container-v2.6.0-272
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-10 11:18:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Description of the HCO YAML after wrong configuration was applied (17.23 KB, text/plain)
2020-11-02 09:49 UTC, Igor Bezukh
no flags Details
Wrong pod placement configuration (457 bytes, text/plain)
2020-11-02 09:52 UTC, Igor Bezukh
no flags Details
HCO CR status (15.96 KB, text/plain)
2020-11-02 09:52 UTC, Igor Bezukh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt hyperconverged-cluster-operator issues 911 0 None closed Pod placement API issue - dry run doesn't occur for all the stanza 2021-02-08 09:18:58 UTC
Github kubevirt hyperconverged-cluster-operator pull 912 0 None closed Validate updates to the whole .spec stanza 2021-02-08 09:18:58 UTC
Github kubevirt hyperconverged-cluster-operator pull 913 0 None closed [release-1.2] Validate updates to the whole .spec stanza 2021-02-08 09:18:58 UTC
Red Hat Product Errata RHSA-2021:0799 0 None None None 2021-03-10 11:19:51 UTC

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


Note You need to log in before you can comment on or make changes to this bug.