Bug 2210991

Summary: Backporting bug 2091976 to 4.12.z
Product: Container Native Virtualization (CNV) Reporter: SATHEESARAN <sasundar>
Component: MetricsAssignee: João Vilaça <jvilaca>
Status: CLOSED ERRATA QA Contact: SATHEESARAN <sasundar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.12.3CC: kmajcher, ocohen, stirabos
Target Milestone: ---   
Target Release: 4.12.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: CNV v4.12.4-50 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-27 19:10:40 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 SATHEESARAN 2023-05-30 09:16:00 UTC
Description of problem:
------------------------
The fix for the bug 2091976 was not backported to CNV v4.12.z. This is required for CNV v4.12.z

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

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. Create a VM with memory.request as 1Gi and memory.limits as 2Gi
2. Run stress-ng inside the VM, to make use of 100% of memory

Actual results:
---------------
Alert is thrown only when free memory goes below 20MB, which is very close to the VM getting evicted. It is because of the reason this limit is raised to 50MB

Expected results:
-----------------
Alert 'KubevirtVmHighMemoryUsage' should be triggered when the free memory of the VM goes below 50MB. The patch that addressed the issue for the bug 2091976 should also be backported to CNV v4.12

Comment 1 SATHEESARAN 2023-06-14 10:23:06 UTC
Verified with CNV v-4.12.4 interim version ( 4.12.4-50 ) with the following steps.

1. Created a fedora VM with memory requests set to 1Gi and memory limits set to 2Gi
2. Identify the virt-launcher pod.
3. Decrease the free/available memory in that virt-launcher pod.
# cat <( </dev/zero head -c 943718400) <(sleep 150) | tail
4. Check for alert in OpenShift Web console.


Following alert message was seen:
"Container compute in pod virt-launcher-fedora-044iv4ww85x3w21a-kh4tn in namespace testproject free memory is less than 20 MB and it is close to requested memory"

But to clarify this the check was actually made for 50MB, though the alert message describes it as 50MB.
This is because of the missing patch.Bug 2210988 takes care of updating this value to 50MB in all the versions.

With this information marking this bug as verified.

Comment 7 errata-xmlrpc 2023-06-27 19:10:40 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 (OpenShift Virtualization 4.12.4 Images), 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/RHEA-2023:3889