Bug 1753252 - [SSP] Common templates - missing cross-validation between values in 'validation' section and actual requested resources [NEEDINFO]
Summary: [SSP] Common templates - missing cross-validation between values in 'validat...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Guest Support
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 2.2.0
Assignee: Martin Sivák
QA Contact: Ruth Netser
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-18 13:36 UTC by Ruth Netser
Modified: 2020-02-24 08:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-19 15:03:46 UTC
Target Upstream Version:
Embargoed:
ipinto: needinfo?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1753243 0 unspecified CLOSED [SSP] Common templates validations - wrong value of minimal-required-memory 2021-02-22 00:41:40 UTC

Description Ruth Netser 2019-09-18 13:36:07 UTC
Description of problem:
Common templates - missing cross-validation between values in 'validation' section and actual requested resources.
The templates verify that requested resources meet the OS minimum requirements.
However, in the resources part of the template, the actual requested resource may violate the requirement.
For now it is relevant for memory.


Version-Release number of selected component (if applicable):
CNV 2.1.0, OCP 4.2.0


How reproducible:
100%

Steps to Reproduce:
1. Open RHEL8 template
oc get templates -n openshift rhel8-server-tiny-v0.6.2 -o yaml

2. Check the value of 'min' under validations --> minimal-required-memory
3. Check the requested memory size under resources.requests.memory

Actual results:
"min": 2147483648 whereas memory: 1G

Expected results:
memory should be equal to min

Additional info:

oc get templates -n openshift rhel8-server-tiny-v0.6.2 -o yaml
================================================================
    validations: |
      [
        {
          "name": "minimal-required-memory",
          "path": "jsonpath::.spec.domain.resources.requests.memory",
          "rule": "integer",
          "message": "This VM requires more memory.",
          "min": 2147483648
        },
      ]

...
...
...
          resources:
            requests:
              memory: 1G
================================================================

Comment 1 Martin Sivák 2019-11-11 08:40:28 UTC
This is more an RFE for our CI system. We should catch issues like this early. The bug here was caused by #1753243 which is fixed now. The minimal requirement for memory should be 1G, which matches the tiny spec.


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