Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1515140 - Could add env with same name from web console
Summary: Could add env with same name from web console
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Jessica Forrester
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-20 08:47 UTC by Yanping Zhang
Modified: 2017-11-21 02:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-21 02:27:43 UTC


Attachments (Terms of Use)

Description Yanping Zhang 2017-11-20 08:47:37 UTC
Description of problem:
On dc or bc environment tab, user could add duplicated env, eg: add test=one twice or add test=one then add test=two. In client, one env name could only set with one value.

Version-Release number of selected component (if applicable):
openshift v3.7.9
kubernetes v1.7.6+a08f5eeb62

How reproducible:
Always

Steps to Reproduce:
1.Create dc.
#oc run hello-openshift --image=aosqe/hello-openshift
2.Login web console, on dc "hello-openshift" page, under "environment" tab, add three envs:
name:test, value:one
name:test, value:two
name:test, value:one
Then click "Save" 
3.Check env in yaml file by click "Edit yaml".
4.Check env in client.
# oc env dc/hello-openshift --list

5.# oc env dc/hello-openshift test=three
deploymentconfig "hello-openshift" updated
6.Check env in client
7.Check env on web.

Actual results:
2. Could add envs successfully.
3. Three envs with name "test' are listed in yaml file.
4. oc env dc/hello-openshift --list
# deploymentconfigs hello-openshift, container hello-openshift
test=one
test=two
test=one

5.# oc env dc/hello-openshift test=three
deploymentconfig "hello-openshift" updated
6.Only one env with name "test" now:
# oc env dc/hello-openshift --list
# deploymentconfigs hello-openshift, container hello-openshift
test=three
7.Only one env with name "test" and value "three" now.


Expected results:
2.Should not allow add env with same name many times.

Additional info:

Comment 1 Jessica Forrester 2017-11-21 02:27:43 UTC
We allow you to do this in the console because the API allows it, we try not to be more restrictive than the API. The cli env command is a little different because its a shortcut for  setting a particular env.


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