Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1120703

Summary: PGError searching for content with many content-views
Product: Red Hat Satellite Reporter: Alex Krzos <akrzos>
Component: Content ManagementAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.3CC: bbuckingham, bkearney, pep
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-11 18:51:14 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:
Attachments:
Description Flags
foreman production.log with debug logging
none
Screenshot of error in UI. none

Description Alex Krzos 2014-07-17 13:57:02 UTC
Description of problem:
Attempted to search for specific package in product content in Sat 6 Content search and PGError ambiguous reference to id is displayed.  See attached screenshot and foreman production.log snippet.

Version-Release number of selected component (if applicable):
Sat 6.0.3 Beta
Build: Snap11-Compose3
RHEL 6.5 2.6.32-431.20.3
katello-1.5.0-26.el6sat.noarch
foreman-1.6.0.21-1.el6sat.noarch
candlepin-0.9.19-1.el6_5.noarch
pulp-server-2.4.0-0.23.beta.el6sat.noarch
puppet-3.6.2-1.el6sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Assuming pre-built Sat 6.0.3 with manifest uploaded, content syned, custom content synced, content views published/promoted
2. Navigate to content search, select Products under content, and attempt to search for a package under products.

Actual results:
PG Error is displayed on browser and error is dumped to foreman/production.log 

Expected results:
Content is searched and no error is displayed.

Additional info:
I have published/promoted a minimum of 99 content views.

Comment 1 Alex Krzos 2014-07-17 13:59:33 UTC
Created attachment 918728 [details]
foreman production.log with debug logging

Comment 2 Alex Krzos 2014-07-17 13:59:58 UTC
Created attachment 918729 [details]
Screenshot of error in UI.

Comment 3 RHEL Program Management 2014-07-17 14:04:11 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 5 Josep 'Pep' Turro Mauri 2014-08-01 15:30:15 UTC
(In reply to Alex Krzos from comment #0)
> Additional info:
> I have published/promoted a minimum of 99 content views.

In case it helps: I just hit this having published/promoted no content views yet, just sync'd a RHEL repo into the Library, went to search for a package, selected the auto-complete for repos and the error appeared as soon as I started typing:

PGError: ERROR: column reference "id" is ambiguous LINE 1: SELECT id FROM "katello_repositories" INNER JOIN "katello_pr... ^ : SELECT id FROM "katello_repositories" INNER JOIN "katello_products" ON "katello_products"."id" = "katello_repositories"."product_id" INNER JOIN "katello_content_view_versions" ON "katello_content_view_versions"."id" = "katello_repositories"."content_view_version_id" WHERE "katello_content_view_versions"."content_view_id" IN (1, 2) AND "katello_repositories"."product_id" IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18) ORDER BY katello_repositories.name ASC (ActiveRecord::StatementInvalid)

Comment 6 Brad Buckingham 2014-08-11 18:51:14 UTC

*** This bug has been marked as a duplicate of bug 1115308 ***