Bug 2039208

Summary: Recording Rule "kubevirt_vm_container_free_memory_bytes" is not working
Product: Container Native Virtualization (CNV) Reporter: Shirly Radco <sradco>
Component: MetricsAssignee: Shirly Radco <sradco>
Status: CLOSED ERRATA QA Contact: Satyajit Bulage <sbulage>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.10.0CC: cnv-qe-bugs, sbulage, stirabos
Target Milestone: ---Flags: sbulage: needinfo-
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hco-bundle-registry-container-v4.10.0-638 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-16 16:06:09 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 Shirly Radco 2022-01-11 09:15:46 UTC
Description of problem:
When we try to execute recording rules: "kubevirt_vm_container_free_memory_bytes" shows "No datapoints found".
This happens since not all VMs have a memory limit set and due to kube_pod_container_resource_limits_memory_bytes metric deprecation in favor of
kube_pod_container_resource_limits.

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


How reproducible:
100%

Steps to Reproduce:
1. Test kubevirt_vm_container_free_memory_bytes when there is a memory limit set for the VMI container.
2.
3.

Actual results:
The recording rule returns "No datapoints found"

Expected results:
The recording rule should have a value 


Additional info:

Comment 1 Shirly Radco 2022-01-11 09:21:07 UTC
PR https://github.com/kubevirt/kubevirt/pull/7052

Comment 2 Satyajit Bulage 2022-02-02 12:55:00 UTC
I am still see "No datapoints found." when  execute "kubevirt_vm_container_free_memory_bytes" metrics.

Currently cluster is running with --> Deployed: CNV-v4.10.0-641

Comment 3 Satyajit Bulage 2022-02-03 08:29:15 UTC
After adding "memory limits" in the VM spec, I am able to see metrics is showing output.
Verifying it.

Comment 4 Satyajit Bulage 2022-02-03 08:49:13 UTC
Bringing back to ON_QA for value validation.

Comment 5 Satyajit Bulage 2022-02-16 03:53:04 UTC
I see recording rule: "kubevirt_vm_container_free_memory_bytes" is using new metrics "https://github.com/kubevirt/kubevirt/pull/7209/files#diff-0f904f2ae31317b82daba8b2976856da054ce0ff43731afe9a91befa5e2489fdR401"

I checked the values by executing individual metrics (from above code) and values are approximately correct(free memory is continuously changing).

Comment 8 errata-xmlrpc 2022-03-16 16:06:09 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.10.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-2022:0947