Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1696016

Summary: The 'Memory - Avg Used' in CloudForms includes cached memory with the used memory of OpenStack instance
Product: Red Hat CloudForms Management Engine Reporter: Nikhil Gupta <ngupta>
Component: ProvidersAssignee: Marek Aufart <maufart>
Status: NEW --- QA Contact: Md Nadeem <mnadeem>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.2CC: dmetzger, jfrey, jhardy, maufart, mshriver, obarenbo
Target Milestone: GA   
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Nikhil Gupta 2019-04-04 02:59:05 UTC
Description of problem:

When running a report with "Memory - Avg Used for Collected Intervals 30 Day Avg (MB)" field, it reports cached memory with the used memory.

We are looking at a specific instance, which has total memory 20,480 MB.  The report for that collected value is 17,658.  This would indicate that used system memory has been about 86% over the last 30 days.  When I look at Nagios dashboard graph and ELK monitoring graph results of memory for the same instance over the last 30 days, I am seeing a peak of about 70% memory usage.  This does not include cache or buffer memory (which would put it closer to 100%).

It looks like if I include cached memory with the used memory (and not counting buffer memory), that puts me close to what CloudForms is reporting.  

Are there any memory values returned from RHOSP queries that would return actual used memory or even just cached memory so as to figure out actual usage?

Version-Release number of selected component (if applicable):
cfme-5.10.2
RHOSP 13 

How reproducible:
Always

Steps to Reproduce:
1. Create VMs and Instances report
2. Add "Name" and "Memory - Avg Used for Collected Intervals 30 Day Avg (MB)" field
3. Run

Actual results:
Reports cached memory with the used memory.

Expected results:
Should report only the actual used memory.

Additional info:
Following bug reported for OpenStack provider in the past:
https://bugzilla.redhat.com/show_bug.cgi?id=1425951

It has been fixed for OpenStack infra provider (Under Cloud):
/opt/rh/cfme-gemset/bundler/gems/cfme-providers-openstack-a277948eff1f/app/models/manageiq/providers/openstack/infra_manager/metrics_capture.rb

However, it is not included in OpenStack cloud provider (Over Cloud):
/opt/rh/cfme-gemset/bundler/gems/cfme-providers-openstack-a277948eff1f/app/models/manageiq/providers/openstack/cloud_manager/metrics_capture.rb