Bug 2164590

Summary: VM with InstanceType validation webhook when checking hugepage size
Product: Container Native Virtualization (CNV) Reporter: Roni Kishner <rkishner>
Component: InfrastructureAssignee: Lee Yarwood <lyarwood>
Status: CLOSED ERRATA QA Contact: Roni Kishner <rkishner>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.13.0CC: dholler, lyarwood, ycui
Target Milestone: ---   
Target Release: 4.13.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: v4.13.0-280 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-18 02:57:02 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:

Description Roni Kishner 2023-01-25 18:41:02 UTC
Description of problem:
When creating a VM with instance type with memory hugepages defined, the validation check relies on spec.template.spec.domain.resources being populated with resource requests, something that isn't ensured until the VirtualMachineInstance mutation webhook runs later when launching the VM


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

How reproducible:
100%

Steps to Reproduce:
1. Create a VM InstanceType with hugepages
2. Create a VM with the InstanceType reference
3. Start the VM

Actual results:
The VM gives an Error:
{
"reason":"FieldValueInvalid",
"message":"spec.template.spec.domain.resources.requests.memory \\'0\\' must be equal to or larger than page size spec.template.spec.domain.hugepages.size \\'1Gi\\'",
"field":"spec.template.spec.domain.resources.requests.memory"
}

Expected results:
VM would start

Additional info:
An upstream bug/PR attached in links

Comment 1 Roni Kishner 2023-03-01 08:40:01 UTC
Fixed in CNV-v4.13.0.rhel9-1631

Comment 3 errata-xmlrpc 2023-05-18 02:57:02 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 4.13.0 Images security, bug fix, and enhancement 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-2023:3205