Bug 1467722 - Internal Server error when searching product repository by numbers with more than 9 digits
Internal Server error when searching product repository by numbers with more ...
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Repositories (Show other bugs)
x86_64 Linux
unspecified Severity medium (vote)
: Beta
: --
Assigned To: Jonathon Turel
Nikhil Kathole
: Regression, Triaged
Depends On:
  Show dependency treegraph
Reported: 2017-07-04 16:44 EDT by Djebran Lezzoum
Modified: 2017-10-10 01 EDT (History)
6 users (show)

See Also:
Fixed In Version: rubygem-bastion-5.0.10
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
screen1 (119.68 KB, image/png)
2017-07-04 16:44 EDT, Djebran Lezzoum
no flags Details
screen2 (110.81 KB, image/png)
2017-07-04 16:44 EDT, Djebran Lezzoum
no flags Details
screenshot of UI repositories created (78.30 KB, image/png)
2017-10-10 01:41 EDT, Nikhil Kathole
no flags Details
Search with ID (28.20 KB, image/png)
2017-10-10 01:42 EDT, Nikhil Kathole
no flags Details
Search with name (68.43 KB, image/png)
2017-10-10 01:42 EDT, Nikhil Kathole
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 20350 None None None 2017-08-01 10:57 EDT
Foreman Issue Tracker 21017 None None None 2017-09-19 15:56 EDT

  None (edit)
Description Djebran Lezzoum 2017-07-04 16:44:07 EDT
Created attachment 1294334 [details]

Description of problem:
Internal Server error when searching product repository by numbers with more than 9 digits

Version-Release number of selected component (if applicable):
* candlepin-2.0.37-1.el7.noarch
* candlepin-selinux-2.0.37-1.el7.noarch
* foreman-1.15.1-1.el7sat.noarch
* foreman-cli-1.15.1-1.el7sat.noarch
* foreman-compute-1.15.1-1.el7sat.noarch
* foreman-debug-1.15.1-1.el7sat.noarch
* foreman-discovery-image-3.1.1-22.el7sat.noarch
* foreman-ec2-1.15.1-1.el7sat.noarch
* foreman-gce-1.15.1-1.el7sat.noarch
* foreman-installer-1.15.1-1.el7sat.noarch
* foreman-installer-katello-
* foreman-libvirt-1.15.1-1.el7sat.noarch
* foreman-openstack-1.15.1-1.el7sat.noarch
* foreman-ovirt-1.15.1-1.el7sat.noarch
* foreman-postgresql-1.15.1-1.el7sat.noarch
* foreman-proxy-1.15.0-2.el7sat.noarch
* foreman-rackspace-1.15.1-1.el7sat.noarch
* foreman-selinux-1.15.0-1.el7sat.noarch
* foreman-vmware-1.15.1-1.el7sat.noarch
* katello-3.4.2-1.el7sat.noarch
* katello-ca-consumer-sat-r220-02.lab.eng.rdu2.redhat.com-1.0-2.noarch
* katello-certs-tools-2.4.0-1.el7sat.noarch
* katello-client-bootstrap-1.4.0-1.el7sat.noarch
* katello-common-3.4.2-1.el7sat.noarch
* katello-debug-3.4.2-1.el7sat.noarch
* katello-default-ca-1.0-1.noarch
* katello-installer-base-
* katello-selinux-3.0.2-1.el7sat.noarch
* katello-server-ca-1.0-1.noarch
* katello-service-3.4.2-1.el7sat.noarch
* openldap-2.4.40-13.el7.x86_64
* pulp-client-1.0-1.noarch
* pulp-docker-plugins-2.3.0-1.el7sat.noarch
* pulp-katello-1.0.2-1.el7sat.noarch
* pulp-ostree-plugins-1.2.1-1.el7sat.noarch
* pulp-puppet-plugins-2.12.2-1.el7sat.noarch
* pulp-puppet-tools-2.12.2-1.el7sat.noarch
* pulp-rpm-plugins-2.12.2-2.el7sat.noarch
* pulp-selinux-2.12.2-2.el7sat.noarch
* pulp-server-2.12.2-2.el7sat.noarch
* python-ldap-2.4.15-2.el7.x86_64
* tfm-rubygem-ldap_fluff-0.4.6-1.el7sat.noarch
* tfm-rubygem-net-ldap-0.15.0-1.el7sat.noarch

How reproducible:

Steps to Reproduce:
1.Goto products 
2. Create a product
3. Select the created product
4. create a repository (of any type) named 9876543210
5. in created and selected product select the repository tab
6. in the search box type 9876543210 

Actual results:
repository list became disabled and no result is returned, the repo created is not listed, in the inspect screen we can see the server response:
500 internal server error

Expected results:
The repo must be listed

Additional info:
this does not happen with all numbers, for example numbers that begin with 0 and 1, the error is reproduced with a search number of 11 digits.

This also does not happen because of the repository name, as if the repo name is for example "zoo" and we search by the numbers the error is also reproduced
Comment 1 Djebran Lezzoum 2017-07-04 16:44 EDT
Created attachment 1294335 [details]
Comment 4 Djebran Lezzoum 2017-07-05 02:49:39 EDT
After this error, it became impossible to search the product repositories a full page refresh is needed to be able to search by other works/keys
Comment 6 Brad Buckingham 2017-07-07 11:18:15 EDT
Are you able to search for the same, if specifying id= or name= ?
Comment 9 Jonathon Turel 2017-08-01 10:57:44 EDT
Connecting redmine issue http://projects.theforeman.org/issues/20350 from this bug
Comment 10 Jonathon Turel 2017-08-01 10:57:59 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20350 has been resolved.
Comment 11 Jonathon Turel 2017-08-01 11:01:07 EDT

Thanks for the report. I looked into it and found that the queries which are failing do so because those numbers are greater than the maximum value that can be held in a Postgres integer field. So, I believe the stack trace / error is a valid one.

However, I think the user experience of having to reload the page when the search breaks is very poor, so I fixed that problem in Katello.
Comment 12 Djebran Lezzoum 2017-08-02 10:40:25 EDT
Thanks Jonathon,

I guessed that it was the case, but also that the default search should be by "name" and not by "id"
Comment 17 Jonathon Turel 2017-09-19 15:56:44 EDT
Connecting redmine issue http://projects.theforeman.org/issues/21017 from this bug
Comment 18 Nikhil Kathole 2017-10-10 01:41:04 EDT

Version Tested:
Satellite-6.3 Snap 19


1. Created product test
2. Created repository 
3. Search with 9876543210 , name = 9876543210, id = 9876543210

Successfully shows result for 9876543210 and name = 9876543210. For id = 9876543210, it shows Field 'id' not recognized for searching! (See attachments)
Comment 19 Nikhil Kathole 2017-10-10 01:41 EDT
Created attachment 1336610 [details]
screenshot of UI repositories created
Comment 20 Nikhil Kathole 2017-10-10 01:42 EDT
Created attachment 1336611 [details]
Search with ID
Comment 21 Nikhil Kathole 2017-10-10 01:42 EDT
Created attachment 1336612 [details]
Search with name

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