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 1354519

Summary: Default S2I images don't allow to set/configure their environmental values via web console
Product: OpenShift Container Platform Reporter: Kenjiro Nakayama <knakayam>
Component: Management ConsoleAssignee: bpeterse
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2.0CC: aos-bugs, erich, jforrest, jokerman, miminar, mmccomas, tdawson
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-27 09:39:40 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 Flags
screenshot for the "Actual results" in comment#0 none

Description Kenjiro Nakayama 2016-07-11 13:25:07 UTC
Created attachment 1178399 [details]
screenshot for the "Actual results" in comment#0

Description of problem:

- New application from extended docker image via web console create deploymentConfig with other layers environmental values

How reproducible:
1. create Dockerfile

# cat <<EOF > Dockerfile

2. Build image and push to the docker hub.

  # docker build -t<ACCOUNT>/eap64-extended . && docker push<ACOCOUNT>/eap64-extended

3. Create imagestream and iimport image

# cat <<EOF > test-is.yaml
apiVersion: v1
kind: ImageStream
  annotations: 2016-06-27T00:38:39Z
  creationTimestamp: null
  name: eap64-extended
  - annotations:
      description: JBoss EAP 6.4 S2I images.
      iconClass: icon-jboss
      sampleContextDir: kitchensink
      sampleRef: 6.4.x
      supports: eap:6.4,javaee:6,java:8,xpaas:1.3
      tags: builder,eap,javaee,java,jboss,xpaas
      version: "latest"
    name: "latest"
  dockerImageRepository: ""

   #  oc create -f test-is.yaml -n openshift &&  oc import-image eap64-extended -n openshift

Actual results:

- Access to the webconsole and click "Show advanced routing, build, and deployment options". It outputs the all environmental values including other layers'.

Expected results:
- Hide other layers' env values.

Additional info:
- If I created the application with oc new-app, deploymentConfig woudln't add the values.

Comment 1 Jessica Forrester 2016-07-11 16:44:43 UTC
new-app doesn't add them to the deployment config explicitly but the environment variables are there at runtime anyway because they are defined on the image itself, including env vars from previous layers. new-app let's you override the variables' values using the -e flag, the web console does it by displaying them to you in the list.  We have no plans to change this behavior in the web console because we are intentionally letting you know those variables exist and what they are set to.  If you want to remove environment variables you need to unset them as part of the image being built.

Comment 2 Kenjiro Nakayama 2016-07-11 17:17:05 UTC
Thank you for the answer. But then, it brings one unclear thing.

Default imagestream (e.g jboss-eap64-openshift) doesn't show any env value, like JBOSS_HOME, JBOSS_IMAGE_NAME and so on. So, although I agree with your design below, how to see these variables that are set on the default builder image via webconsole?

> We have no plans to change this behavior in the web console because we are intentionally letting you know those variables exist and what they are set to.

Comment 3 Jessica Forrester 2016-07-11 17:45:28 UTC
Thanks for bringing up this issue, the Env appears on one subobject in the API response in one case and a different subobject in the other case. We are looking into it.

Comment 4 Jessica Forrester 2016-07-11 19:06:54 UTC
We need to switch to always pulling dockerImageMetadata.Config.Env instead of dockerImageMetadata.ContainerConfig.Env

Comment 5 Kenjiro Nakayama 2016-07-12 00:08:04 UTC
* Update subject and here is the correct issue and reproduce steps *

Reproduce steps

1. Add new-project
2. Select "jboss-eap64-openshift"
3. Click "Show advanced routing, build, and deployment options Create"

Actual results:
- Deployment Config doesn't show any environment values to configure

Expected results:
- Show env values that the image have. (e.g JBOSS_HOME, JBOSS_IMAGE_NAME for jboss-eap64-openshift image)

- Extend the image and use the image

Comment 7 Jessica Forrester 2016-07-19 17:27:36 UTC
Fixed in Origin, we did end up changing the behavior, it will not save the env from the image, it now shows you the exist in a read only state and the user can choose to override those values if they want to explicitly set them to something different.  See details in

Comment 8 Troy Dawson 2016-08-01 22:02:03 UTC
I'm not understanding how this is supposed to make it to OpenShift Container Platform.

Comment 9 Jessica Forrester 2016-08-01 23:14:05 UTC
@tdawson we only mark it as MODIFIED if the console change has been vendored back into the origin repo.

Comment 10 Troy Dawson 2016-08-08 21:36:52 UTC
This has been merged and is in OSE v3.3.0.17 or newer.

Comment 12 Yadan Pei 2016-08-11 01:48:42 UTC
Checked against openshift v3.3.0.18
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

This is verification steps

1. Create a new project
2. Select "jboss-eap64-openshift:1.4"
3. Click "Show advanced routing, build, and deployment options"
4. In Deployment Configuration section, click "Show/Hide image environment variables" could toggle the display of existing environment variables

Existing environment variables is shown as readonly and user could overwrite them by defining to different value

Comment 13 Yadan Pei 2016-08-11 01:49:37 UTC
This works as expected I think, move to VERIFIED

Comment 15 errata-xmlrpc 2016-09-27 09:39:40 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.