Bug 963295

Summary: Searching in the Templates page in Foreman raises a DB stack trace
Product: Red Hat Satellite Reporter: Og Maciel <omaciel>
Component: ProvisioningAssignee: Lukas Zapletal <lzap>
Status: CLOSED CURRENTRELEASE QA Contact: Og Maciel <omaciel>
Severity: low Docs Contact:
Priority: unspecified    
Version: NightlyCC: bkearney, cwelton, dcleal, jmontleo, jsherril, lzap, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/2575
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 969448 (view as bug list) Environment:
Last Closed: 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: 969448, 969486    

Description Og Maciel 2013-05-15 15:21:06 UTC
Description of problem:

Performing searches within the Provisioning Templates page in Foreman raises a DB stack trace

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

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.8.7-1.el6.noarch
* candlepin-selinux-0.8.7-1.el6.noarch
* candlepin-tomcat6-0.8.7-1.el6.noarch
* elasticsearch-0.19.9-7.el6.noarch
* foreman-1.1stable-31.3849429.el6.noarch
* foreman-installer-puppet-concat-0-2.d776701.el6.noarch
* foreman-installer-puppet-dhcp-0-5.3a4a13c.el6.noarch
* foreman-installer-puppet-dns-0-7.fcae203.el6.noarch
* foreman-installer-puppet-foreman-0-6.568c5c4.el6.noarch
* foreman-installer-puppet-foreman_proxy-0-8.bd1e35d.el6.noarch
* foreman-installer-puppet-puppet-0-2.ef1ba61.el6.noarch
* foreman-installer-puppet-tftp-0-5.ea6c5e5.el6.noarch
* foreman-installer-puppet-xinetd-0-2.09540eb.el6.noarch
* foreman-postgresql-1.1stable-31.3849429.el6.noarch
* foreman-proxy-1.0.1-11.aff8fa8.el6.noarch
* foreman-proxy-installer-1.0.1-6.f5ae2cd.el6.noarch
* katello-1.4.2-1.git.333.d2a35bc.el6.noarch
* katello-all-1.4.2-1.git.333.d2a35bc.el6.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-1.el6.noarch
* katello-cli-1.4.2-1.git.48.441089b.el6.noarch
* katello-cli-common-1.4.2-1.git.48.441089b.el6.noarch
* katello-common-1.4.2-1.git.333.d2a35bc.el6.noarch
* katello-configure-1.4.3-1.git.12.bc3684c.el6.noarch
* katello-configure-foreman-1.4.3-1.git.12.bc3684c.el6.noarch
* katello-glue-candlepin-1.4.2-1.git.333.d2a35bc.el6.noarch
* katello-glue-elasticsearch-1.4.2-1.git.333.d2a35bc.el6.noarch
* katello-glue-pulp-1.4.2-1.git.333.d2a35bc.el6.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-repos-1.4.2-1.el6.noarch
* katello-selinux-1.4.3-1.git.3.ce8227b.el6.noarch
* openldap-2.4.23-32.el6_4.1.x86_64
* pulp-admin-client-2.1.1-0.10.beta.el6.noarch
* pulp-builtins-admin-extensions-2.1.1-0.10.beta.el6.noarch
* pulp-rpm-admin-extensions-2.1.1-0.10.beta.el6.noarch
* pulp-rpm-plugins-2.1.1-0.10.beta.el6.noarch
* pulp-selinux-2.1.1-0.10.beta.el6.noarch
* pulp-server-2.1.1-0.10.beta.el6.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.1.3-4.el6.noarch
* ruby193-rubygem-net-ldap-0.2.2-6.el6.noarch

How reproducible:


Steps to Reproduce:
1. Go to Provisioning Templates in Foreman UI
2. Perform a search by entering a search criteria 
3.
  
Actual results:


Expected results:


Additional info:

PGError: ERROR: syntax error at or near "FIRST" LINE 1: ...fig_templates".id, "config_templates"."name"NULLS FIRST AS ... ^ : SELECT DISTINCT "config_templates".id, "config_templates"."name"NULLS FIRST AS alias_0 FROM "config_templates" LEFT OUTER JOIN "taxable_taxonomies" ON "taxable_taxonomies"."taxable_id" = "config_templates"."id" AND "taxable_taxonomies"."taxable_type" = 'ConfigTemplate' LEFT OUTER JOIN "taxonomies" ON "taxonomies"."id" = "taxable_taxonomies"."taxonomy_id" AND taxonomies.type='Location' LEFT OUTER JOIN "taxable_taxonomies" "taxable_taxonomies_config_templates_join" ON "taxable_taxonomies_config_templates_join"."taxable_id" = "config_templates"."id" AND "taxable_taxonomies_config_templates_join"."taxable_type" = 'ConfigTemplate' LEFT OUTER JOIN "taxonomies" "organizations_config_templates" ON "organizations_config_templates"."id" = "taxable_taxonomies_config_templates_join"."taxonomy_id" AND taxonomies.type='Organization' LEFT OUTER JOIN "config_templates_operatingsystems" ON "config_templates_operatingsystems"."config_template_id" = "config_templates"."id" LEFT OUTER JOIN "operatingsystems" ON "operatingsystems"."id" = "config_templates_operatingsystems"."operatingsystem_id" LEFT OUTER JOIN "template_combinations" ON "template_combinations"."config_template_id" = "config_templates"."id" LEFT OUTER JOIN "environments" ON "environments"."id" = "template_combinations"."environment_id" LEFT OUTER JOIN "template_combinations" "template_combinations_config_templates_join" ON "template_combinations_config_templates_join"."config_template_id" = "config_templates"."id" LEFT OUTER JOIN "hostgroups" ON "hostgroups"."id" = "template_combinations_config_templates_join"."hostgroup_id" LEFT OUTER JOIN "template_kinds" ON "template_kinds"."id" = "config_templates"."template_kind_id" LEFT OUTER JOIN "template_combinations" "template_combinations_config_templates" ON "template_combinations_config_templates"."config_template_id" = "config_templates"."id" LEFT OUTER JOIN "hostgroups" "hostgroups_template_combinations" ON "hostgroups_template_combinations"."id" = "template_combinations_config_templates"."hostgroup_id" LEFT OUTER JOIN "environments" "environments_template_combinations" ON "environments_template_combinations"."id" = "template_combinations_config_templates"."environment_id" WHERE (("taxonomies"."name" ILIKE '%root%' OR "taxonomies"."name" ILIKE '%root%' OR "config_templates"."name" ILIKE '%root%' OR "config_templates"."template" ILIKE '%root%' OR "operatingsystems"."name" ILIKE '%root%' OR "environments"."name" ILIKE '%root%' OR "hostgroups"."name" ILIKE '%root%' OR "template_kinds"."name" ILIKE '%root%')) ORDER BY "config_templates"."name" ASC NULLS FIRST LIMIT 20 OFFSET 0

Comment 1 Lukas Zapletal 2013-05-30 12:51:51 UTC
Bug in pg driver in Rails: ruby193-rubygem-rails-3.2.8-4.el6_4.noarch

To fix this, we need Rails 3.2.9 or newer (https://github.com/wvanbergen/scoped_search/issues/52).

I will backport the issue.

Comment 2 Lukas Zapletal 2013-05-31 09:28:36 UTC
This is the pull request I am backporting: https://github.com/rails/rails/pull/5168

Comment 4 Sam Kottler 2013-06-11 19:51:28 UTC
Moved to ON_QA as part of puddle 4.5.

Comment 5 Og Maciel 2013-06-12 20:04:43 UTC
Still seeing this with latest build:
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.8.9-1.el6_4.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.9-1.el6_4.noarch
* candlepin-tomcat6-0.8.9-1.el6_4.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* foreman-1.1.10009-1.noarch
* foreman-compute-1.1.10009-1.noarch
* foreman-installer-puppet-concat-0-2.d776701.git.0.21ef926.el6sat.noarch
* foreman-installer-puppet-dhcp-0-5.3a4a13c.el6sat.noarch
* foreman-installer-puppet-dns-0-7.fcae203.el6sat.noarch
* foreman-installer-puppet-foreman-0-6.568c5c4.el6sat.noarch
* foreman-installer-puppet-foreman_proxy-0-8.bd1e35d.el6sat.noarch
* foreman-installer-puppet-puppet-0-3.ab46748.el6sat.noarch
* foreman-installer-puppet-tftp-0-5.ea6c5e5.el6sat.noarch
* foreman-installer-puppet-xinetd-0-50a267b8.git.0.44aca6a.el6sat.noarch
* foreman-libvirt-1.1.10009-1.noarch
* foreman-postgresql-1.1.10009-1.noarch
* foreman-proxy-1.1.10003-1.el6sat.noarch
* foreman-proxy-installer-1.0.1-8.f5ae2cd.el6sat.noarch
* katello-1.4.2-12.el6sat.noarch
* katello-all-1.4.2-12.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.2-7.el6sat.noarch
* katello-cli-common-1.4.2-7.el6sat.noarch
* katello-common-1.4.2-12.el6sat.noarch
* katello-configure-1.4.3-15.el6sat.noarch
* katello-configure-foreman-1.4.3-15.el6sat.noarch
* katello-foreman-all-1.4.2-12.el6sat.noarch
* katello-glue-candlepin-1.4.2-12.el6sat.noarch
* katello-glue-elasticsearch-1.4.2-12.el6sat.noarch
* katello-glue-pulp-1.4.2-12.el6sat.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.4.3-3.el6sat.noarch
* openldap-2.4.23-31.el6.x86_64
* pulp-rpm-plugins-2.1.1-1.el6sat.noarch
* pulp-selinux-2.1.1-1.el6sat.noarch
* pulp-server-2.1.1-1.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.2.2-1.el6sat.noarch
* ruby193-rubygem-net-ldap-0.3.1-2.el6sat.noarch
* signo-0.0.16-1.el6sat.noarch
* signo-katello-0.0.16-1.el6sat.noarch

Comment 6 Corey Welton 2013-06-14 17:45:06 UTC
bumping this one out.

Comment 7 Dominic Cleal 2013-09-18 18:51:14 UTC
I don't think this was actually fully built, only scratch built.  The current version, ruby193-rubygem-activerecord-3.2.8-8.el6_4, doesn't appear to contain any patch from Lukas.

Setting this back to POST, as we addressed it only in upstream packages.  Please don't move to ON_QA without the downstream fix.

Comment 12 Og Maciel 2013-10-01 14:26:19 UTC
Verified:
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.8.25-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.25-1.el6sam.noarch
* candlepin-tomcat6-0.8.25-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* foreman-1.3.0-10.el6sat.noarch
* foreman-compute-1.3.0-10.el6sat.noarch
* foreman-libvirt-1.3.0-10.el6sat.noarch
* foreman-postgresql-1.3.0-10.el6sat.noarch
* foreman-proxy-1.3.0-1.el6sat.noarch
* katello-1.4.6-15.el6sat.noarch
* katello-all-1.4.6-15.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.4-1.el6sat.noarch
* katello-cli-1.4.3-15.el6sat.noarch
* katello-cli-common-1.4.3-15.el6sat.noarch
* katello-common-1.4.6-15.el6sat.noarch
* katello-configure-1.4.5-8.el6sat.noarch
* katello-configure-foreman-1.4.5-8.el6sat.noarch
* katello-configure-foreman-proxy-1.4.5-8.el6sat.noarch
* katello-foreman-all-1.4.6-15.el6sat.noarch
* katello-glue-candlepin-1.4.6-15.el6sat.noarch
* katello-glue-elasticsearch-1.4.6-15.el6sat.noarch
* katello-glue-pulp-1.4.6-15.el6sat.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.4.4-4.el6sat.noarch
* openldap-2.4.23-31.el6.x86_64
* pulp-katello-plugins-0.2-1.el6sat.noarch
* pulp-nodes-common-2.3.0-0.14.alpha.el6sat.noarch
* pulp-nodes-parent-2.3.0-0.14.alpha.el6sat.noarch
* pulp-puppet-plugins-2.3.0-0.14.alpha.el6sat.noarch
* pulp-rpm-plugins-2.3.0-0.14.alpha.el6sat.noarch
* pulp-selinux-2.3.0-0.14.alpha.el6sat.noarch
* pulp-server-2.3.0-0.14.alpha.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.2.2-2.el6sat.noarch
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.0.7-1.el6sat.noarch
* signo-0.0.20-3.el6sat.noarch
* signo-katello-0.0.20-3.el6sat.noarch

Comment 15 Bryan Kearney 2014-04-24 17:10:23 UTC
This was verified and delivered with MDP2. Closing it out.

Comment 16 Bryan Kearney 2014-04-24 17:11:40 UTC
This was delivered and verified with MDP2. Closing the bug.