Bug 970463

Summary: Adding custom info value (length > 255 characters) for system failed
Product: Red Hat Satellite Reporter: Tazim Kolhar <tkolhar>
Component: Content ManagementAssignee: Adam Price <adprice>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: NightlyCC: cwelton, gkhachik, mmccune, omaciel, sthirugn, tkolhar
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-12 20:54:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tazim Kolhar 2013-06-04 05:37:26 UTC
Description of problem:
Adding custom info value (length > 255 characters) for system failed  

Version-Release number of selected component (if applicable):
# rpm -qa | grep katello
katello-cli-common-1.4.2-6.el6sat.noarch
katello-glue-elasticsearch-1.4.2-8.el6sat.noarch
signo-katello-0.0.15-1.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-configure-1.4.3-12.el6sat.noarch
katello-common-1.4.2-8.el6sat.noarch
katello-headpin-1.4.2-8.el6sat.noarch
katello-glue-candlepin-1.4.2-8.el6sat.noarch
katello-headpin-all-1.4.2-8.el6sat.noarch
katello-cli-1.4.2-6.el6sat.noarch
katello-selinux-1.4.3-3.el6sat.noarch


How reproducible:
# yum install -y katello-headpin-all
# katello-configure --user-pass=****

Steps to Reproduce:
1. headpin --username "admin" --password **** system custom_info add --name "sys-CustomInfo-1370299136" --org "org-sys-1370299136" --keyname "desc-256Chars1370299545" --value "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abcdef"
Stdout:
Stderr:
PGError: ERROR: value too long for type character varying(255)
: INSERT INTO "custom_info" ("created_at", "informable_id", "informable_type", "keyname", "updated_at", "value") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"
ExitCode: 244



Actual results:
The cli command failed

Expected results:
The command throws proper error

Additional info:

Please, refer 
- http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/job/official-headpin-cli/127/ReportNG_Report/

Comment 1 Garik Khachikyan 2013-06-04 13:32:20 UTC
also: please try to catch the error in a level higher than PG is.

Comment 3 Adam Price 2013-06-12 19:45:57 UTC
https://github.com/Katello/katello/pull/2363

Comment 6 Adam Price 2013-06-12 20:54:23 UTC

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