Bug 987670

Summary: CLI: Env/org name and Label needs to have same character limit. Creating an env/org name with more that 128 characters throws an incorrect error string.
Product: [Retired] Subscription Asset Manager Reporter: Apurva Bhole <abhole>
Component: katelloAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: SAM QE List <sam-qe-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 1.3CC: bkearney, omaciel, sghai, sthirugn, tkolhar
Target Milestone: rc   
Target Release: 1.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 995937 (view as bug list) Environment:
Last Closed: 2013-10-01 11:14:14 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:
Bug Depends On:    
Bug Blocks: 833466, 995937    

Description Apurva Bhole 2013-07-23 20:43:40 UTC
Description of problem:
When attempting to create an environment with name longer than 128 characters, the error string thrown is incorrect

Version-Release number of selected component (if applicable):
katello-selinux-1.4.3-1.git.4.99dc194.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-all-1.4.2-1.git.951.091dd45.el6.noarch
signo-katello-0.0.9-1.el6.noarch
katello-glue-pulp-1.4.2-1.git.951.091dd45.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-1.4.2-1.git.131.cacfdea.el6.noarch
katello-configure-1.4.3-1.git.67.f71e590.el6.noarch
katello-common-1.4.2-1.git.951.091dd45.el6.noarch
katello-glue-candlepin-1.4.2-1.git.951.091dd45.el6.noarch
katello-certs-tools-1.4.2-1.el6.noarch
katello-1.4.2-1.git.951.091dd45.el6.noarch
katello-repos-1.4.2-1.el6.noarch
katello-cli-common-1.4.2-1.git.131.cacfdea.el6.noarch
katello-glue-elasticsearch-1.4.2-1.git.951.091dd45.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch

How reproducible:
everytime

Steps to Reproduce:
1. org create --name FirstOrg
2. environment create --org "FirstOrg" --name "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abcdefghi" --prior "Library"

Actual results:
Validation failed: Label cannot contain more than 128 characters

Expected results:
Validation failed: Name cannot contain more than 128 characters

Comment 1 Apurva Bhole 2013-07-24 19:21:23 UTC
This is also an issue for org name with more than 128 characters. If

Comment 2 sthirugn@redhat.com 2013-07-24 19:29:33 UTC
Also observed in Product and Repository fields.  

The entire affected list is:
1. Organization
2. Environment
3. Product
4. Repository

Comment 3 Og Maciel 2013-07-24 19:34:32 UTC
For environments, I believe what we want is the message to state that *both* name and label for the environment cannot be longer than 128 characters. The same probably applies to the other areas.

Comment 4 Sachin Ghai 2013-07-25 10:45:28 UTC
The same issue I found with content-view definitions.  Earlier the limit for CV definition was 128 characters for both Label and name. Now for 'name' the limit is 255 characters and for label is 128.

Ideally, it should be 128 characters for both name and label.

Comment 5 Bryan Kearney 2013-08-02 18:52:04 UTC
SNAP0 contains these bug fixes. Moving to ON_QA.

Comment 7 Tazim Kolhar 2013-08-13 06:45:41 UTC
VERIFIED :

# rpm -qa | grep katello
katello-selinux-1.4.4-2.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-common-1.4.3-5.el6sat.noarch
katello-cli-1.4.3-5.el6sat.noarch
katello-common-1.4.3-6.el6sam_splice.noarch
katello-configure-1.4.4-2.el6sat.noarch
katello-glue-elasticsearch-1.4.3-6.el6sam_splice.noarch
katello-headpin-all-1.4.3-6.el6sam_splice.noarch
katello-glue-candlepin-1.4.3-6.el6sam_splice.noarch
signo-katello-0.0.10-2.el6sat.noarch
katello-headpin-1.4.3-6.el6sam_splice.noarch


Org create with label of 128 characters shows appropriate error :

# headpin -u admin -p **** org create --name "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abcdefghi" --label  "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abcdefghi"
Validation failed: Label cannot contain more than 128 characters

Org names with 128 characters works correctly :

# headpin -u admin -p **** org create --name "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abcdefghi"
Successfully created org [ 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abcdefghi ]

Comment 9 errata-xmlrpc 2013-10-01 11:14:14 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.

http://rhn.redhat.com/errata/RHEA-2013-1390.html