Bug 1396906

Summary: Should give error message when setting resource Name with 1 character
Product: OKD Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, mmccomas, spadgett
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-30 12:49:48 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:

Description Yadan Pei 2016-11-21 06:33:25 UTC
Description of problem:
When create Config Map on web console, set the Name with only 1 character, Create button is disabled but no error info

Version-Release number of selected component (if applicable):
openshift v1.5.0-alpha.0+3b2bbe5
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0


How reproducible:
Always

Steps to Reproduce:
1.Go to Config Maps page -> Click "Create Config Map"
2.Set Key: special.how
3.1 Set Name with dash ended:  my-
3.2 Set Name with dash started: -myconfigmap
3.3 Set Name with invalid character: #@
3.4 Set Name with 1 character: t

Actual results:
3.1-3.3 Create button is disabled and give error info:
Config map names may only contain lower-case letters, numbers, and dashes. They may not start or end with a dash.
3.4 Create button is disabled, but no error info prompted

Expected results:
3.4 Should also give error info about what format correct Name should be 

Additional info:

Comment 1 Yadan Pei 2016-11-21 07:03:01 UTC
Found this is not a specific issue introduced by Config Map feature, actually when create project/route with Name set to 1 character, web console didn't give error message either, so changed the title and downgrade the severity

Comment 2 Samuel Padgett 2016-11-21 13:15:38 UTC
It turns out that one character names are allowed for these resources. Fixed by

https://github.com/openshift/origin-web-console/pull/900

Comment 3 Yadan Pei 2016-11-23 02:27:10 UTC
Checked against openshift v1.5.0-alpha.0+7b7a447-55

Create these resources with 1 character

    Config maps
    HPAs
    PVCs
    Routes

Resource could be created successfully

When creating project with 1 character, give error message "Name must have at least two characters"

Move to VERIFIED