Bug 1386334

Summary: Searching Provisioning Templates results in error
Product: Red Hat Satellite Reporter: Taft Sanders <tasander>
Component: Provisioning TemplatesAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: high    
Version: 6.2.2CC: bbuckingham, bkearney, dcaplan, dkaylor, egolov, hprakash, jcallaha, mtenheuv, oshtaier, tbrisker, yundtj, zhunting
Target Milestone: UnspecifiedKeywords: PrioBumpPM, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman-1.11.0.66-2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1417107 (view as bug list) Environment:
Last Closed: 2017-03-06 08:29:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1417107    

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):
foreman-postgresql-1.11.0.53-1.el7sat.noarch

How reproducible:
N/A

Steps to Reproduce:
1.
2.
3.

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?

Thanks,
David

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-

http://projects.theforeman.org/projects/foreman/repository/revisions/77cb9ca918baa11f57dcb41ff2900e0292908c82/diff/app/models/concerns/taxonomix.rb


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.

https://access.redhat.com/errata/RHBA-2017:0447