[regression] host search by organization never finishes but causes mem.leak in foreman process
Description of problem:
Searching for hosts by organization (and optionally specifying more filters for the search) does not terminate. Rather "Passenger RackApp: /usr/share/foreman" process consumes more and more memory until OOM-killed.
This is a regression between 6.2.8 (search works fine) and 6.2.9 (search doesnt work).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
curl -u admin:redhat "https://$(hostname -f)/api/v2/hosts?organization_id=1&page=1&search=&sort_by=name&sort_order=ASC"
(or in WebUI, goto Hosts -> All hosts and use filter "organization = Organization_Name")
(you can try more complex query as well that shall fail the same way, like:
curl -u admin:redhat "https://$(hostname -f)/api/v2/hosts?organization_id=1&page=1&search=subscription_status+%3D+invalid&sort_by=name&sort_order=ASC"
2. Wait a minute
3. Monitor RSS usage of "Passenger RackApp: /usr/share/foreman" process.
The query never finishes.
RSS usage of the foreman process grows forever.
The query to finish in reasonable time.
No huge RSS increase.
per tbrisker, the regression is suspected due to https://bugzilla.redhat.com/show_bug.cgi?id=1419667