Bug 1532936 - Cannot add env vars into slave pod template in jenkins webconsole against jenkins-2-rhel7 image
Summary: Cannot add env vars into slave pod template in jenkins webconsole against jen...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 3.9.0
Assignee: Gabe Montero
QA Contact: Dongbo Yan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-10 02:59 UTC by Dongbo Yan
Modified: 2018-03-28 14:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: There was a bug in the kubernetes plugin from upstream jenkins that did not allow the adding of env vars to pod templates unless env vars were defined at the global jenkins level. Consequence: Adding pod template env vars were cumbersome. Fix: An upstream jenkins kubernetes plugin fix arrived, and it was pulled into the openshift jenkins image. Result: You can now add env vars to templates from the jenkins console regardless of what env vars were previously defined.
Clone Of:
Environment:
Last Closed: 2018-03-28 14:18:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 0 None None None 2018-03-28 14:18:45 UTC

Description Dongbo Yan 2018-01-10 02:59:33 UTC
Description of problem:
Cannot add env vars into slave pod template in jenkins webconsole against jenkins-2-rhel7 image

Version-Release number of selected component (if applicable):
brew-pulp.../openshift3/jenkins-2-rhel7:v3.9 (imageid: 4e3dc986043c)
openshift v3.9.0-0.15.0
kubernetes v1.9.0-beta1
etcd 3.2.8

How reproducible:
Always

Steps to Reproduce:
1.Create a jenkins server via jenkins-2-rhel7 image
 $ oc new-app jenkins-ephemeral
2.Wait for jenkins pod is ready, log into jenkins webconsole, then add env vars into pod template
'Manege Jenkins' -> 'Configure System' -> 'Cloud' -> 'Kubernetes Pod Template' -> 'EnvVars'
3.

Actual results:
Cannot add env vars, no response when click 'Add Environment Variable' button

Expected results:
could add env vars

Additional info:
work around: create a configmap includes pod template data, then jenkins could pick up pod template automatic, could see env vars have been added.

Comment 1 Ben Parees 2018-01-10 03:11:05 UTC
I think we may have had this reported before and the issue is that you need to define the env var as a jenkins env var before you can add it to the pod template, but not sure.  Gabe should be able to confirm.

(It is certainly strange if you have to define the env var in jenkins to add it via the console, but can explicitly configure arbitrary env vars when doing it via the xml).

Comment 2 Gabe Montero 2018-01-10 20:51:22 UTC
Dongbo Yan's timing is spot on :-) 

As was Ben's recollection on the item and the workaround

Turns out, the k8s plugin is now tracking this via https://issues.jenkins-ci.org/browse/JENKINS-47112

and the repo owner just noted earlier today that the fix is in the v1.1.3 he just published earlier today.

We are currently at 1.0.0, and would pick up about another dozen fixes in addition to this one.

Ben - and I'll preface that I am on the fence here - what is your take on the risk/reward with updating the k8s plugin version with dcut later today?

Comment 3 Gabe Montero 2018-01-10 21:08:39 UTC
Created https://github.com/openshift/jenkins/pull/475 to track.

Running a plugin regression.

Comment 4 Gabe Montero 2018-01-10 22:33:10 UTC
OK PR has merged and https://buildvm.openshift.eng.bos.redhat.com:8443/job/devex/job/devex%252Fjenkins-plugins/20/ has completed.

Moving to on qa for them to try with centos image when it arrives on docker hub or rhel image when it arrives in appropriate staging area.

Comment 5 Gabe Montero 2018-01-10 22:34:07 UTC
associated dist-git:  http://pkgs.devel.redhat.com/cgit/rpms/jenkins-2-plugins/?h=rhaos-3.9-rhel-7

Comment 6 Dongbo Yan 2018-01-11 10:59:49 UTC
Verified with docker.io/openshift/jenkins-2-centos7 (6d8d0127a29e)
kubernetes	1.1.3

could add env vars into pod template in jenkins webconsole.
when new rhel image built, will test again. move this bug to modified

Comment 8 Dongbo Yan 2018-01-23 09:05:49 UTC
Test with brew-pulp.../openshift3/jenkins-2-rhel7 (0c405904a82a)

cannot reproduce this issue, could move to verified

Comment 11 errata-xmlrpc 2018-03-28 14:18:26 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.

https://access.redhat.com/errata/RHBA-2018:0489


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