Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1532936 - Cannot add env vars into slave pod template in jenkins webconsole against jenkins-2-rhel7 image
Cannot add env vars into slave pod template in jenkins webconsole against jen...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
3.9.0
Unspecified Unspecified
medium Severity low
: ---
: 3.9.0
Assigned To: Gabe Montero
Dongbo Yan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-09 21:59 EST by Dongbo Yan
Modified: 2018-03-28 10:18 EDT (History)
3 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-28 10:18:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 None None None 2018-03-28 10:18 EDT

  None (edit)
Description Dongbo Yan 2018-01-09 21:59:33 EST
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-09 22:11:05 EST
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 15:51:22 EST
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 16:08:39 EST
Created https://github.com/openshift/jenkins/pull/475 to track.

Running a plugin regression.
Comment 4 Gabe Montero 2018-01-10 17:33:10 EST
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 17:34:07 EST
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 05:59:49 EST
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 04:05:49 EST
Test with brew-pulp.../openshift3/jenkins-2-rhel7 (0c405904a82a)

cannot reproduce this issue, could move to verified
Comment 11 errata-xmlrpc 2018-03-28 10:18:26 EDT
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.