Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1125831 - PGError: ERROR: bigint out of range: on setting entries_per_page to long integer value
PGError: ERROR: bigint out of range: on setting entries_per_page to long int...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
6.0.4
Unspecified Unspecified
low Severity medium (vote)
: Unspecified
: Unused
Assigned To: orabin
Tazim Kolhar
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-01 03:55 EDT by Sachin Ghai
Modified: 2017-02-23 16:08 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:12:31 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)
ERROR: bigint out of range on setting parameter with long interger value (18.46 KB, image/png)
2014-08-01 03:55 EDT, Sachin Ghai
no flags Details
UI shows long numerid value for param "entries_per_page" (54.91 KB, image/png)
2014-08-01 03:57 EDT, Sachin Ghai
no flags Details
entries per page value (92.36 KB, image/png)
2014-12-12 08:00 EST, Tazim Kolhar
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 6874 None None None 2016-04-22 11:15 EDT
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 2014-08-01 03:55:07 EDT
Created attachment 923127 [details]
ERROR: bigint out of range on setting parameter with long interger value

Description of problem:
while performing boundary tests, I tried to set the "entries_per_page" parameter value with long integer value and on save, it was set as some exponential value. but when I navigate to some other tab and get back, the value was displayed correctly.

Later when I navigate to other page(for example: users), UI throws following error:

--
Oops, we're sorry but something went wrong
 
Error
PGError: ERROR: bigint out of range : SELECT "users".* FROM "users" WHERE (1=1) AND (users.auth_source_id <> 2) LIMIT 299999999999999999999999999999999999999999999999999999999999 OFFSET 0
---

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

How reproducible:
always

Steps to Reproduce:
1. Go to settings --> general --> select "entries_per_page" and update it with long integer value
2.
3.

Actual results:
Production.logs: when I navigate to 'users' menu:

Processing by UsersController#index as HTML
  Rendered users/index.html.erb within layouts/application (7.4ms)
Operation FAILED: PGError: ERROR:  bigint out of range
: SELECT  "users".* FROM "users"  WHERE (1=1) AND (users.auth_source_id <> 2) LIMIT 299999999999999999999999999999999999999999999999999999999999 OFFSET 0
  Rendered common/500.html.erb within layouts/application (5.4ms)
  Rendered layouts/base.html.erb (1.2ms)
Completed 500 Internal Server Error in 186ms (Views: 9.0ms | ActiveRecord: 0.4ms)



Expected results:
User shouldn't be allowed to set a long value, we should define certain limit for any parameter. And if that limit exceeds, UI should throw an error message.

Additional info:
Comment 1 Sachin Ghai 2014-08-01 03:57:23 EDT
Created attachment 923128 [details]
UI shows long numerid value for param "entries_per_page"
Comment 2 Dominic Cleal 2014-08-01 04:00:25 EDT
Created redmine issue http://projects.theforeman.org/issues/6874 from this bug
Comment 3 Sachin Ghai 2014-08-01 04:01:45 EDT
Please note that there are other parameters under general tab, like "idle_timeout", "max_trend". we should define higher limits of these parameters too. As of now I can define any numeric value for these parameters.
Comment 4 Dominic Cleal 2014-08-01 04:04:17 EDT
idle_timeout shouldn't be a problem, it was fixed in bug #1113349.  If there are different issues with extreme values of those settings, new BZs would be best as they're not really related.
Comment 5 Sachin Ghai 2014-08-01 04:10:26 EDT


(In reply to Dominic Cleal from comment #4)
> idle_timeout shouldn't be a problem, it was fixed in bug #1113349.

I can still set long integer value for idle_timeout though I didn't see any error or issue after setting it. But it would be good if we can set certain limit for such parameters.

>  If there
> are different issues with extreme values of those settings, new BZs would be
> best as they're not really related.

Sure. thank you.
Comment 6 Dominic Cleal 2014-08-01 04:11:52 EDT
(In reply to Sachin Ghai from comment #5)
> 
> 
> (In reply to Dominic Cleal from comment #4)
> > idle_timeout shouldn't be a problem, it was fixed in bug #1113349.
> 
> I can still set long integer value for idle_timeout though I didn't see any
> error or issue after setting it. But it would be good if we can set certain
> limit for such parameters.

If it doesn't cause any problems, I don't think there's a reason to limit it.  The bug was easily fixed, but I'm sure a limit would have been introduced if necessary.

It might be this setting will get a limit to fix the bug you found.
Comment 8 Bryan Kearney 2014-08-21 06:04:25 EDT
Upstream bug assigned to orabin@redhat.com
Comment 9 Bryan Kearney 2014-09-15 09:44:51 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/6874 has been closed
-------------
Ori Rabin
Applied in changeset commit:c737b10e70187bfeeb0727edc2282f25cf7165e4.
Comment 10 Tazim Kolhar 2014-12-12 07:59:00 EST
VERIFIED:

*** This bug is verified in upstream. This fix should eventually land in future downstream builds ***

# rpm -q | grep foreman
rpm: no arguments given for query
[root@qe-foreman-rhel66 ~]# rpm -qa | grep foreman
foreman-ovirt-1.8.0-0.develop.201412111740git287d974.el6.noarch
qe-foreman-rhel66.usersys.redhat.com-puppet-client-1.0-1.noarch
foreman-gce-1.8.0-0.develop.201412111740git287d974.el6.noarch
ruby193-rubygem-foreman-tasks-0.6.10-2.el6.noarch
rubygem-hammer_cli_foreman-0.1.4-1.201412111235git2131f5d.el6.noarch
foreman-release-1.8.0-0.develop.201412111740git287d974.el6.noarch
qe-foreman-rhel66.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-foreman-rhel66.usersys.redhat.com-qpid-client-cert-1.0-1.noarch
ruby193-rubygem-foreman_docker-0.2.0-2.el6.noarch
ruby193-rubygem-foreman_discovery-1.4.1-1.el6.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2-1.el6.noarch
foreman-libvirt-1.8.0-0.develop.201412111740git287d974.el6.noarch
qe-foreman-rhel66.usersys.redhat.com-apache-1.0-1.noarch
qe-foreman-rhel66.usersys.redhat.com-parent-cert-1.0-1.noarch
foreman-1.8.0-0.develop.201412111740git287d974.el6.noarch
foreman-vmware-1.8.0-0.develop.201412111740git287d974.el6.noarch
foreman-selinux-1.8.0-0.develop.201411281557gitf4a857f.el6.noarch
foreman-proxy-1.8.0-0.develop.201412111700gita7c8c34.el6.noarch
foreman-postgresql-1.8.0-0.develop.201412111740git287d974.el6.noarch
qe-foreman-rhel66.usersys.redhat.com-foreman-proxy-1.0-1.noarch
qe-foreman-rhel66.usersys.redhat.com-qpid-broker-1.0-1.noarch
foreman-compute-1.8.0-0.develop.201412111740git287d974.el6.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410gitc96619d.git.0.37f3704.el6.noarch

UI does not allow to set long integer value under 

  settings --> general --> select "entries_per_page"

screen shot attached
Comment 11 Tazim Kolhar 2014-12-12 08:00:08 EST
Created attachment 967624 [details]
entries per page value
Comment 12 Bryan Kearney 2015-08-11 09:19:39 EDT
This bug is slated to be released with Satellite 6.1.
Comment 13 errata-xmlrpc 2015-08-12 01:12:31 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.