Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1187480 - Searching applicable errata by package_name throwing internal server error on UI and PGError in production.log
Searching applicable errata by package_name throwing internal server error on...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
Nightly
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: Unused
Assigned To: Justin Sherrill
sthirugn@redhat.com
: Triaged
Depends On:
Blocks: 1130651 1188301
  Show dependency treegraph
 
Reported: 2015-01-30 02:32 EST by Sachin Ghai
Modified: 2017-02-23 15:36 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-12 01:22:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
500 internal server error raised in firebug (55.14 KB, image/png)
2015-01-30 02:32 EST, Sachin Ghai
no flags Details
complete logs from production.log (25.26 KB, text/plain)
2015-01-30 02:34 EST, Sachin Ghai
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1592 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 05:04:35 EDT

  None (edit)
Description Sachin Ghai 2015-01-30 02:32:16 EST
Created attachment 985875 [details]
500 internal server error raised in firebug

Description of problem:
while searching applicable errata by package_name throwing 500 Internal server error in firebug and PGError on production.log


from production.log:
=====================
Processing by Katello::Api::V2::ErrataController#index as JSON
  Parameters: {"errata_restrict_applicable"=>"true", "organization_id"=>"1", "page"=>"1", "paged"=>"true", "repository_id"=>"4", "search"=>"  package_name = zsh", "sort_by"=>"updated", "sort_order"=>"DESC", "api_version"=>"v2"}
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/app/views/katello/api/v2/errata/index.json.rabl within katello/api/v2/layouts/collection (7.5ms)
ActiveRecord::StatementInvalid: PGError: ERROR:  syntax error at or near "DISTINCT"
LINE 1: SELECT  DISTINCT DISTINCT "katello_errata".id, katello_errat...
                         ^
: SELECT  DISTINCT DISTINCT "katello_errata".id, katello_errata.updated AS alias_0 FROM "katello_errata" INNER JOIN "katello_repository_errata" ON "katello_repository_errata"."erratum_id" = "katello_errata"."id" INNER JOIN "katello_system_errata" ON "katello_system_errata"."erratum_id" = "katello_errata"."id" LEFT OUTER JOIN "katello_erratum_packages" ON "katello_erratum_packages"."erratum_id" = "katello_errata"."id" WHERE "katello_repository_errata"."repository_id" IN (SELECT "katello_repositories"."id" FROM "katello_repositories"  WHERE "katello_repositories"."product_id" IN (SELECT "katello_products"."id" FROM "katello_products" ) AND "katello_repositories"."environment_id" IN (4, 3, 2, 1) ORDER BY katello_repositories.name ASC) AND "katello_system_errata"."system_id" IN (SELECT "katello_systems"."id" FROM "katello_systems" ) AND (("katello_errata"."id" IN (SELECT "erratum_id" FROM "katello_erratum_packages" WHERE "katello_erratum_packages"."name" = 'zsh' ))) ORDER BY katello_errata.updated DESC LIMIT 20 OFFSET 0



Version-Release number of selected component (if applicable):
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.38-1.el6.noarch
* candlepin-common-1.0.18-1.el6.noarch
* candlepin-selinux-0.9.38-1.el6.noarch
* candlepin-tomcat6-0.9.38-1.el6.noarch
* elasticsearch-0.90.10-7.el6.noarch
* foreman-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-compute-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-gce-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-libvirt-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-ovirt-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-postgresql-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-proxy-1.8.0-0.develop.201501261316git9ea2ac7.el6.noarch
* foreman-release-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-selinux-1.8.0-0.develop.201412151103gite2863e4.el6.noarch
* foreman-vmware-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* katello-2.1.0-1.201411061509gitb0b8f43.el6.noarch
* katello-certs-tools-2.0.1-1.el6.noarch
* katello-default-ca-1.0-1.noarch
* katello-installer-2.2.0-1.201501230914git3dbe606.el6.noarch
* katello-installer-base-2.2.0-1.201501230914git3dbe606.el6.noarch
* katello-repos-2.1.1-1.el6.noarch
* katello-server-ca-1.0-1.noarch
* openldap-2.4.39-8.el6.x86_64
* pulp-docker-plugins-0.2.1-0.2.beta.el6.noarch
* pulp-katello-0.3-3.el6.noarch
* pulp-nodes-common-2.5.1-1.el6.noarch
* pulp-nodes-parent-2.5.1-1.el6.noarch
* pulp-puppet-plugins-2.5.1-1.el6.noarch
* pulp-puppet-tools-2.5.1-1.el6.noarch
* pulp-rpm-plugins-2.5.1-1.el6.noarch
* pulp-selinux-2.5.1-1.el6.noarch
* pulp-server-2.5.1-1.el6.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.3.3-1.el6.noarch
* ruby193-rubygem-net-ldap-0.10.0-1.el6.noarch
* ruby193-rubygem-runcible-1.3.0-1.el6.noarch
* rubygem-hammer_cli-0.1.4-1.201501260908gitf44b8c5.el6.noarch
* rubygem-hammer_cli_foreman-0.1.4-1.201501221305git706b057.el6.noarch
* rubygem-hammer_cli_foreman_bootdisk-0.1.2-1.el6.noarch
*

How reproducible:
always

Steps to Reproduce:
1. Go to Errata page, make sure org is selected
2. select the repo from dropdown
3. Select Applicable check-box
4. search the "package_name = zsh"
Make sure firebug is open 

Actual results:


Expected results:
firebug:
=======
"NetworkError: 500 Internal Server Error - https://dhcp201-185.englab.pnq.redhat.com/katello/api/v2/errata?errata_restrict_applicable=true&organization_id=1&page=1&paged=true&repository_id=4&search=++package_name+%3D+zsh&sort_by=updated&sort_order=DESC"


production.log:
================

from production.log:
=====================
Processing by Katello::Api::V2::ErrataController#index as JSON
  Parameters: {"errata_restrict_applicable"=>"true", "organization_id"=>"1", "page"=>"1", "paged"=>"true", "repository_id"=>"4", "search"=>"  package_name = zsh", "sort_by"=>"updated", "sort_order"=>"DESC", "api_version"=>"v2"}
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/app/views/katello/api/v2/errata/index.json.rabl within katello/api/v2/layouts/collection (7.5ms)
ActiveRecord::StatementInvalid: PGError: ERROR:  syntax error at or near "DISTINCT"
LINE 1: SELECT  DISTINCT DISTINCT "katello_errata".id, katello_errat...
                         ^
: SELECT  DISTINCT DISTINCT "katello_errata".id, katello_errata.updated AS alias_0 FROM "katello_errata" INNER JOIN "katello_repository_errata" ON "katello_repository_errata"."erratum_id" = "katello_errata"."id" INNER JOIN "katello_system_errata" ON "katello_system_errata"."erratum_id" = "katello_errata"."id" LEFT OUTER JOIN "katello_erratum_packages" ON "katello_erratum_packages"."erratum_id" = "katello_errata"."id" WHERE "katello_repository_errata"."repository_id" IN (SELECT "katello_repositories"."id" FROM "katello_repositories"  WHERE "katello_repositories"."product_id" IN (SELECT "katello_products"."id" FROM "katello_products" ) AND "katello_repositories"."environment_id" IN (4, 3, 2, 1) ORDER BY katello_repositories.name ASC) AND "katello_system_errata"."system_id" IN (SELECT "katello_systems"."id" FROM "katello_systems" ) AND (("katello_errata"."id" IN (SELECT "erratum_id" FROM "katello_erratum_packages" WHERE "katello_erratum_packages"."name" = 'zsh' ))) ORDER BY katello_errata.updated DESC LIMIT 20 OFFSET 0



Version-Release number of selected component (if applicable):
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.38-1.el6.noarch
* candlepin-common-1.0.18-1.el6.noarch
* candlepin-selinux-0.9.38-1.el6.noarch
* candlepin-tomcat6-0.9.38-1.el6.noarch
* elasticsearch-0.90.10-7.el6.noarch
* foreman-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-compute-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-gce-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-libvirt-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-ovirt-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-postgresql-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-proxy-1.8.0-0.develop.201501261316git9ea2ac7.el6.noarch
* foreman-release-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* foreman-selinux-1.8.0-0.develop.201412151103gite2863e4.el6.noarch
* foreman-vmware-1.8.0-0.develop.201501270025gite86494a.el6.noarch
* katello-2.1.0-1.201411061509gitb0b8f43.el6.noarch
* katello-certs-tools-2.0.1-1.el6.noarch
* katello-default-ca-1.0-1.noarch
* katello-installer-2.2.0-1.201501230914git3dbe606.el6.noarch
* katello-installer-base-2.2.0-1.201501230914git3dbe606.el6.noarch
* katello-repos-2.1.1-1.el6.noarch
* katello-server-ca-1.0-1.noarch
* openldap-2.4.39-8.el6.x86_64
* pulp-docker-plugins-0.2.1-0.2.beta.el6.noarch
* pulp-katello-0.3-3.el6.noarch
* pulp-nodes-common-2.5.1-1.el6.noarch
* pulp-nodes-parent-2.5.1-1.el6.noarch
* pulp-puppet-plugins-2.5.1-1.el6.noarch
* pulp-puppet-tools-2.5.1-1.el6.noarch
* pulp-rpm-plugins-2.5.1-1.el6.noarch
* pulp-selinux-2.5.1-1.el6.noarch
* pulp-server-2.5.1-1.el6.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.3.3-1.el6.noarch
* ruby193-rubygem-net-ldap-0.10.0-1.el6.noarch
* ruby193-rubygem-runcible-1.3.0-1.el6.noarch
* rubygem-hammer_cli-0.1.4-1.201501260908gitf44b8c5.el6.noarch
* rubygem-hammer_cli_foreman-0.1.4-1.201501221305git706b057.el6.noarch
* rubygem-hammer_cli_foreman_bootdisk-0.1.2-1.el6.noarch
*

Additional info:
Comment 1 Sachin Ghai 2015-01-30 02:34:42 EST
Created attachment 985876 [details]
complete logs from production.log
Comment 3 Justin Sherrill 2015-02-18 15:47:03 EST
resolved as part of https://bugzilla.redhat.com/show_bug.cgi?id=1179462

but on a different page, so moving to on-qa
Comment 4 sthirugn@redhat.com 2015-03-03 16:16:18 EST
Failed

Satellite-6.1.0-RHEL-6-20150224.0
Comment 5 Justin Sherrill 2015-03-06 12:47:43 EST
This will be fixed by https://bugzilla.redhat.com/show_bug.cgi?id=1198363

Moving to POST.  No additional cherrypick needed.
Comment 8 sthirugn@redhat.com 2015-03-17 16:59:54 EDT
Verified in Satellite-6.1.0-RHEL-6-20150311.1. I am able to search the package names in errata page.
Comment 9 Bryan Kearney 2015-08-11 09:23:14 EDT
This bug is slated to be released with Satellite 6.1.
Comment 10 errata-xmlrpc 2015-08-12 01:22:50 EDT
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/RHSA-2015:1592

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