Bug 2210988

Summary: Incorrect alert description for the alert KubevirtVmHighMemoryUsage
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.13.0CC: kmajcher, stirabos
Target Milestone: ---   
Target Release: 4.14.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: hco-bundle-registry-container-v4.14.0.rhel9-1131 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 14:05:49 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:01:53 UTC
Description of problem:
-----------------------
With the bug[1] that was fixed for CNV v4.11.4, the alert 'KubevirtVmHighMemoryUsage' was triggered when the requested memory of the VM goes below 50MB. Earlier this requested memory constraint was at 20MB.The alert description continues to state the old information of 20MB.
<snip>
Description
    Container {{ $labels.container }} in pod {{ $labels.pod }} in namespace {{ $labels.namespace }} free memory is less than 20 MB and it is close to requested memory
</snip>

The expression used to check for the condition was correct though.
kubevirt_vm_container_free_memory_bytes_based_on_working_set_bytes<5.24288e+07 or kubevirt_vm_container_free_memory_bytes_based_on_rss<5.24288e+07

[1] - https://bugzilla.redhat.com/show_bug.cgi?id=2091976

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

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

Steps to Reproduce:
-------------------
1. From OpenShift Web Console, click on 'Observe' -> 'Alerting' -> click on 'Alerting Rules' tab -> search for name 'KubevirtVmHighMemoryUsage' -> click on the alert named 'KubevirtVmHighMemoryUsage'
2. Check for the description of this alert

Actual results:
---------------
Description is found as below:
Container {{ $labels.container }} in pod {{ $labels.pod }} in namespace {{ $labels.namespace }} free memory is less than 20 MB and it is close to requested memory

Expected results:
-----------------
Description should be updated to reflect that information that this alert would be triggered when free memory is less 50MB of the request memory

Additional info:
----------------
This incorrect alert information is found in CNV v4.14, CNV v4.13 and also in CNV v4.12. CNV v4.12 actually missed the fix itself.

Comment 1 Krzysztof Majcher 2023-05-30 12:44:57 UTC
Please make sure to address on all code streams.

Comment 2 SATHEESARAN 2023-07-10 12:24:04 UTC
The correct description for KubevirtVmHighMemoryUsage is found with CNV versions:
v4.14.0.rhel9-1154,
v4.12.5-12

<snip>
Container {{ $labels.container }} in pod {{ $labels.pod }} in namespace {{ $labels.namespace }} free memory is less than 50Mi and it is close to requested memory
</snip>

Marking this bug as VERIFIED as the description is corrected

Comment 4 errata-xmlrpc 2023-11-08 14:05:49 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 (Important: OpenShift Virtualization 4.14.0 Images 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-2023:6817