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:
Missing the actual "PGError" observed. (foreman-debug should also be included on every bug report.)
Unsure exactly which bug caused it, but I believe this is fixed by either bug #1120271 or bug #1120181.
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)
Created redmine issue http://projects.theforeman.org/issues/7624 from this bug
*** 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
This bug is slated to be released with Satellite 6.1.
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