Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1121936 - PGError when media name exceeds 255 characters
Summary: PGError when media name exceeds 255 characters
Keywords:
Status: CLOSED DUPLICATE of bug 1120095
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: orabin
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On: 1120271
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-22 07:46 UTC by Sachin Ghai
Modified: 2016-04-22 14:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-29 16:46:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6712 0 None None None 2016-04-22 14:56:57 UTC

Description Sachin Ghai 2014-07-22 07:46:47 UTC
Description of problem:
I was trying to perform boundary test are created a install media with more than 255 characters and UI raises following error:


Error
PGError: ERROR: value too long for type character varying(255) : INSERT INTO "media" ("config_path", "created_at", "image_path", "media_path", "name", "os_family", "path", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"


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

How reproducible:
always

Steps to Reproduce:
1. create media with more than 255 characters of name
2.
3.

Actual results:
Error
PGError: ERROR: value too long for type character varying(255) : INSERT INTO "media" ("config_path", "created_at", "image_path", "media_path", "name", "os_family", "path", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"

Expected results:
A proper validation error should be raised.

Additional info:
production.log:

Processing by MediaController#create as */*
  Parameters: {"utf8"=>"✓", "search"=>"", "authenticity_token"=>"VX+UKFuIgqWyHwxAdhnLIrzFLAmDgGh5qENjFuLnsso=", "medium"=>{"name"=>"GlQTCDmDxesNUcEJdEXrqTPuIbBUmQwkejHGSrMbHsLGdhADopvRvwnLXHMReeAtIxlkRNpuKAkHGHMziLsnOndDMfemCoDgJewqSrwAXUTLAKeNnCeleDJeGBVnlmzBzZamfDmUBMjqJchefmIxCnJuHGoHilwrnMCRNZuMQnwyEguohCjIMznZRkGHrZXKmHikPGUblhRyBJxoZoadIiUKmlhoAxtzBZtjezFyrIsQSZvcYSjTuwGHwYjUCbM1", "path"=>"http://mirror.fakeos.org/vVcP/$major.$minor/os/$arch", "media_path"=>"", "config_path"=>"", "image_path"=>"", "os_family"=>"Redhat", "location_ids"=>[""], "organization_ids"=>[""]}}
Operation FAILED: PGError: ERROR:  value too long for type character varying(255)
: INSERT INTO "media" ("config_path", "created_at", "image_path", "media_path", "name", "os_family", "path", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"
  Rendered common/500.html.erb (6.9ms)
Completed 500 Internal Server Error in 23ms (Views: 7.6ms | ActiveRecord: 2.1ms)

Comment 1 Dominic Cleal 2014-07-22 07:53:14 UTC
Created redmine issue http://projects.theforeman.org/issues/6712 from this bug

Comment 3 Bryan Kearney 2014-07-29 16:46:22 UTC
The same fix gets both. Please treat these as duplicates even though item being edited is not the same.

*** This bug has been marked as a duplicate of bug 1120095 ***


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