Bug 1123818 - location char name is capped to 246 instead of 255
Summary: location char name is capped to 246 instead of 255
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: orabin
QA Contact: jcallaha
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On: 1120271 1129202
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-28 10:42 UTC by Kedar Bidarkar
Modified: 2017-02-23 21:10 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:11:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 7624 0 None None None 2016-04-22 16:42:47 UTC
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description Kedar Bidarkar 2014-07-28 10:42:50 UTC
Description of problem:

Unable to create loccation names with char limit of 255.

We face PGError, when creating names more than 246 chars.




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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

We have the below 2 issues:

a) Unable to create locations name with 255 chars, currently capped to 246chars.
b) The location name field, should display "cannot create name with more than 255 chars", instead of te PGError.

Expected results:
We need the fix for both the below issues.

a) location name field needs to accept upto 255 chars.
b) Instead of dispaying the PGError, the UI needs to handle it and display "mot more than 255 chars" for more than 255 char limit.

Additional info:

Comment 1 Dominic Cleal 2014-07-28 10:51:55 UTC
Missing the actual "PGError" observed.

(foreman-debug should also be included on every bug report.)

Comment 3 Dominic Cleal 2014-07-31 13:54:56 UTC
Unsure exactly which bug caused it, but I believe this is fixed by either bug #1120271 or bug #1120181.

Comment 6 Sachin Ghai 2014-08-19 10:15:24 UTC
automation caught this issue. It is still reproducible with sat6 GA snap5.

I created a location with 247 char and UI raises below PGError:

[root@qetello02 ~]# tail -f /var/log/foreman/production.log
--
Processing by LocationsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"xQ7fD56/+bKh4LV28Zx3HFMB7bSJ84FMdepqBYa1isE=", "location"=>{"name"=>"DDVROq3fXzO24DcjDcxaC6x5QVA8FHQpCJtSdtWzagWzSoiBMrxDfLFPC1o0XgvI59F0a8O7RtlrAudYNADknKMvTP7A3FRSvZ77CLmbsIv7bG2bv7ZVgi29ERZWDAsYRAP4xDDZwRvnJsGCBaYvK5fX6ilA6exksUMfrTLqm86gQPSrMgcULAh1KR5NZfvir1XCtU9Xxeh4vzrjubsmk9bKn0DFgXe5N3L8i5x0LPuvK7ABSztbHaw"}, "commit"=>"Submit"}
Operation FAILED: PGError: ERROR:  value too long for type character varying(255)
: UPDATE "lookup_values" SET "match" = 'location=DDVROq3fXzO24DcjDcxaC6x5QVA8FHQpCJtSdtWzagWzSoiBMrxDfLFPC1o0XgvI59F0a8O7RtlrAudYNADknKMvTP7A3FRSvZ77CLmbsIv7bG2bv7ZVgi29ERZWDAsYRAP4xDDZwRvnJsGCBaYvK5fX6ilA6exksUMfrTLqm86gQPSrMgcULAh1KR5NZfvir1XCtU9Xxeh4vzrjubsmk9bKn0DFgXe5N3L8i5x0LPuvK7ABSztbHaw' WHERE "lookup_values"."match" = 'location='
  Rendered common/500.html.erb within layouts/application (5.2ms)
  Rendered layouts/base.html.erb (1.3ms)
Completed 500 Internal Server Error in 61ms (Views: 8.7ms | ActiveRecord: 10.1ms)

Comment 7 orabin 2014-09-24 13:02:13 UTC
Created redmine issue http://projects.theforeman.org/issues/7624 from this bug

Comment 8 jcallaha 2014-12-05 16:30:58 UTC
*** This bug is verified in upstream.  This fix should eventually land in future downstream builds ***

Version Tested:
RHEL 65/66/7

foreman-postgresql-1.8.0-0.develop.201412040955git563fa28.el7.noarch
qe-foreman-rhel7.usersys.redhat.com-qpid-client-cert-1.0-1.noarch
foreman-libvirt-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2-1.el7.noarch
foreman-compute-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ruby193-rubygem-foreman_discovery-1.4.1-1.el7.noarch
foreman-proxy-1.8.0-0.develop.201411261259git6ddd00d.el7.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410git163c264.git.0.988ca80.el7.noarch
qe-foreman-rhel7.usersys.redhat.com-foreman-proxy-1.0-1.noarch
foreman-release-1.8.0-0.develop.201412040955git563fa28.el7.noarch
foreman-gce-1.8.0-0.develop.201412040955git563fa28.el7.noarch
foreman-vmware-1.8.0-0.develop.201412040955git563fa28.el7.noarch
rubygem-hammer_cli_foreman-0.1.3-1.201411121216git9381fc5.el7.noarch
ruby193-rubygem-foreman-tasks-0.6.9-1.el7.noarch
foreman-ovirt-1.8.0-0.develop.201412040955git563fa28.el7.noarch
foreman-selinux-1.8.0-0.develop.201411281557gitf4a857f.el7.noarch
foreman-1.8.0-0.develop.201412040955git563fa28.el7.noarch
qe-foreman-rhel7.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-foreman-rhel7.usersys.redhat.com-apache-1.0-1.noarch
qe-foreman-rhel7.usersys.redhat.com-parent-cert-1.0-1.noarch
ruby193-rubygem-foreman_docker-0.2.0-2.el7.noarch
qe-foreman-rhel7.usersys.redhat.com-puppet-client-1.0-1.noarch
qe-foreman-rhel7.usersys.redhat.com-qpid-broker-1.0-1.noarch

Comment 9 Bryan Kearney 2015-08-11 13:24:41 UTC
This bug is slated to be released with Satellite 6.1.

Comment 10 errata-xmlrpc 2015-08-12 05:11:47 UTC
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.