Bug #20038

unqualified search on hostgroup page results in large memory spike and potential OOM

Added by Justin Sherrill about 1 year ago. Updated 9 days ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Host groups
Target version:1.15.2
Difficulty: Team Backlog:
Triaged: Fixed in Releases:
Bugzilla link:1462350 Found in Releases:
Pull request:https://github.com/theforeman/foreman/pull/4600

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1462350

Description of problem:

When you have a large number of host groups, and a large number of associated puppet classes, searching for hostgroups via the UI or api can cause a huge spike of memory if the search is unqualified (i.e. does not include 'field=value', but instead is just 'value').

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

How reproducible:
Always (with user data)

Steps to Reproduce:
1. On a system with lots of hostgroups and puppet class associations
2. Navigate to config > hostgroups
3. search for "FOO" where FOO is the name of a hostgroup

Actual results:
Passenger memory balloons by many gigs, OOM killer may kick in

Expected results:
No major memory usage increase

Additional info:

Associated revisions

Revision 2eb0e4de
Added by Justin Sherrill about 1 year ago

Fixes #20038 - exclude classes from hostgroup free search

Revision 9ce02171
Added by Justin Sherrill about 1 year ago

Fixes #20038 - exclude classes from hostgroup free search

(cherry picked from commit 2eb0e4deef6c63a4b4c5f4102305c917bc1208d0)

History

#1 Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Assignee set to Justin Sherrill
  • Pull request https://github.com/theforeman/foreman/pull/4600 added

#2 Updated by Justin Sherrill about 1 year ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Ohad Levy about 1 year ago

  • Legacy Backlogs Release (now unused) set to 240

#4 Updated by Justin Sherrill about 1 year ago

  • Assignee deleted (Justin Sherrill)
  • Legacy Backlogs Release (now unused) changed from 240 to 266

Proposing for 1.15.2 as it would save some effort to make sure it appears in the right places

Also available in: Atom PDF