Bug 1386334 - Searching Provisioning Templates results in error
Summary: Searching Provisioning Templates results in error
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.2.2
Hardware: x86_64
OS: Linux
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: jcallaha
: 1390270 (view as bug list)
Depends On:
Blocks: 1417107
TreeView+ depends on / blocked
Reported: 2016-10-18 17:12 UTC by Taft Sanders
Modified: 2020-06-11 13:02 UTC (History)
12 users (show)

Fixed In Version: foreman-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1417107 (view as bug list)
Last Closed: 2017-03-06 08:29:26 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15498 0 Normal Closed Search for templates in org/location results in "invalid reference to FROM-clause entry for table "hostgroups"" 2020-10-06 00:26:26 UTC
Red Hat Product Errata RHBA-2017:0447 0 normal SHIPPED_LIVE Satellite 6.2.8 Async Bug Release 2017-03-06 13:23:41 UTC

Description Taft Sanders 2016-10-18 17:12:04 UTC
Description of problem:
When searching on the webui for provisioning templates, the search errors out with the following like error:

Oops, we're sorry but something went wrong PG::Error: ERROR: invalid reference to FROM-clause entry for table "hostgroups" LINE 1: SELECT hostgroups.id FROM "hostgroups" "hostgroups_template_... ^ HINT: Perhaps you meant to reference the table alias "hostgroups_template_combinations". : SELECT hostgroups.id FROM "hostgroups" "hostgroups_template_combinations"

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

How reproducible:

Steps to Reproduce:

Actual results:
Postgres throwing errors when searching for information

Expected results:
Search results to return

Additional info:

Comment 2 David Kaylor 2016-10-31 15:34:04 UTC
Was this fixed for 6.2.3? I can reproduce the error in 6.2.2 but 6.2.3 is working fine.

Comment 3 Brad Buckingham 2016-10-31 18:21:40 UTC
*** Bug 1390270 has been marked as a duplicate of this bug. ***

Comment 4 David Kaylor 2016-10-31 19:32:46 UTC
It appears that there is still an issue. Previously, I ran into Postgres errors when searching with a simple string rather than something like "name ~ search_term".

I initially tested 6.2.3 with the Organization set to a specific org and the Location set to "Any Location." This worked fine.

However, setting the Location to a specific location results in the same error:

PG::Error: ERROR: invalid reference to FROM-clause entry for table "hostgroups" LINE 1: SELECT hostgroups.id FROM "hostgroups" "hostgroups_template_... ^ HINT: Perhaps you meant to reference the table alias "hostgroups_template_combinations". : SELECT hostgroups.id FROM "hostgroups" "hostgroups_template_combinations"

There is an upstream bug here: http://projects.theforeman.org/issues/15498.

Should I open a new bug or is this one good?


Comment 5 Marek Hulan 2016-11-01 07:53:46 UTC
I think this one is good, it's the same issue. I link it to the upstream issue too, thanks David.

Comment 6 Bryan Kearney 2016-11-08 17:10:30 UTC
Upstream bug assigned to mhulan

Comment 7 Bryan Kearney 2016-11-08 17:10:34 UTC
Upstream bug assigned to mhulan

Comment 8 Bryan Kearney 2016-11-09 11:10:33 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/15498 has been resolved.

Comment 11 hprakash 2017-01-17 10:43:47 UTC
A new case(#01774041) for satellite 6.2.6 has been reported to be hitting this bug. The below fix-


is available in foreman 1.13 and works fine. Customer has asked if it can be back ported to foreman 1.11?

Comment 12 Oleksandr Shtaier 2017-02-13 09:49:31 UTC
Verified both manually and through test automation scripts

Functionality works properly starting 6.2.8 version

Comment 14 errata-xmlrpc 2017-03-06 08:29:26 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.