Bug 1658811

Summary: Reporting filter causes Reporting Worker to spike 10GB+
Product: Red Hat CloudForms Management Engine Reporter: Ryan Spagnola <rspagnol>
Component: PerformanceAssignee: Keenan Brock <kbrock>
Status: CLOSED NOTABUG QA Contact: Sudhir Mallamprabhakara <smallamp>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.8.5CC: dmetzger, greartes, jocarter, jprause, kbrock, obarenbo, rspagnol
Target Milestone: GA   
Target Release: cfme-future   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-25 15:35:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Ryan Spagnola 2018-12-12 21:47:57 UTC
Description of problem:
Setting a filter based on the following causes reporting worker to hit 10GB+ 

VM Template and Image.Management Events : Dest Ems Cluster Name 

In customer environment removing the filter allows the report to complete as expected

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

How reproducible:
Always in customer environment

Steps to Reproduce:
1. Go to Cloud Intel > Reports
2. create a custom report with the above filter
3.

Actual results:
Reporting worker exceeds memory

Expected results:
Report should complete

Additional info:

Comment 4 Keenan Brock 2019-02-05 18:28:54 UTC
It looks like the report is downloading all the events in the event stream.
Are you really looking for a template that has an event associated with a particular cluster?

current:

conditions: !ruby/object:MiqExpression
  exp:
    CONTAINS:
      field: MiqTemplate.ems_events-dest_ems_cluster_name
      value: Recurso

I expect it to not to go through events and reference the template.ems_cluster.name.

conditions: !ruby/object:MiqExpression
  exp:
    CONTAINS:
      field: MiqTemplate.ems_cluster-name
      value: Recurso

I'll look into optimizing this relationship, but do wonder if it is the report definition at fault.

Comment 5 Keenan Brock 2019-02-05 21:41:35 UTC
I played with the expression, and I feel it could possibly be INCLUDES (or EQUAL) instead of CONTAINS.
From what I understand, CONTAINS is for tags while INCLUDES/EQUAL is for field values (like cluster name)

This regular expression is showing all templates with a cluster name that includes Recurso (or is equal to) Recurso

conditions: !ruby/object:MiqExpression
  exp:
    EQUAL:
      field: MiqTemplate.ems_cluster_name
      value: Recurso

Comment 6 Ryan Spagnola 2019-02-06 14:11:58 UTC
I'll update the customer with the change and will follow up if it works for them.