Bug 1396906 - Should give error message when setting resource Name with 1 character
Summary: Should give error message when setting resource Name with 1 character
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Management Console
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-21 06:33 UTC by Yadan Pei
Modified: 2017-05-30 12:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-30 12:49:48 UTC
Target Upstream Version:


Attachments (Terms of Use)

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


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