Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1386334 - Searching Provisioning Templates results in error
Summary: Searching Provisioning Templates results in error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.2.2
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: jcallaha
URL:
Whiteboard:
: 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-1.11.0.66-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1417107 (view as bug list)
Environment:
Last Closed: 2017-03-06 08:29:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
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):
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


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