Bug 2174892 - GUI should set VM memory to guest memory instead of memory requests
Summary: GUI should set VM memory to guest memory instead of memory requests
Keywords:
Status: NEW
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: SSP
Version: future
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.14.0
Assignee: Karel Šimon
QA Contact: Kedar Bidarkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-02 14:48 UTC by Itamar Holder
Modified: 2023-08-02 15:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CNV-26378 0 None None None 2023-03-02 14:50:45 UTC

Description Itamar Holder 2023-03-02 14:48:55 UTC
Description of problem:
Currently when choosing memory amount in the GUI console, the memory is applied to `vmi.spec.domain.resources.requests[memory]`.

This field is NOT meant to reflect the amount of memory allocated to the guest, but instead the amount of memory allocated to the virt-launcher pod (which includes virtualization infrastructure overhead in addition to the guest memory).

When users set a memory amount for VMs/VMIs, they mean to set `vmi.spec.domain.memory.guest`, which specifies the amount of memory the guest could use.

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


How reproducible:
100%

Steps to Reproduce:
1. Define a VM with certain amount of memory
2. See that for this vmi `vmi.spec.domain.resources.requests[memory]` is being set with the specified amount.
3.

Actual results:
When defining a VMI with a memory amount, `vmi.spec.domain.resources.requests[memory]` field is being set.

Expected results:
When defining a VMI with a memory amount, `vmi.spec.domain.memory.guest` should be set.
`vmi.spec.domain.resources.requests[memory]` should stay empty unless the user had explicitly asked to populate it.

Comment 1 Matan Schatzman 2023-03-06 07:31:46 UTC
Hey @iholder 

Currently, our common templates still contain request.memory , I can adjust our editors and wizard to add the user adjustments of memory to memory.guest, but in the final VM/VMI object, the memory will appear in both request.memory and memory.guest - is this the desired result? imho I think our common templates should be updated to the memory.guest?

Comment 2 Itamar Holder 2023-03-08 10:30:32 UTC
Hey @mschatzm,

Thanks for bringing it into attention.
Eventually, VMs/VMIs should *only* have the guest memory field populated, unless the user explicitly populates requests[memory] field on rare cases.

So yes, our templates need to be updated so the memory request is not populated by default.

Comment 3 Guohua Ouyang 2023-08-01 05:28:36 UTC
Move the bug to SSP for updating the common templates.

Comment 4 Dominik Holler 2023-08-02 15:19:08 UTC
It would be helpful to verify this bug on a cluster with quotas enabled.


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