Bug 1099252 - [RFE]Update Jenkins version - Plugins not working
Summary: [RFE]Update Jenkins version - Plugins not working
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-19 23:12 UTC by recon
Modified: 2015-05-15 00:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-20 18:03:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description recon 2014-05-19 23:12:44 UTC
Description of problem:
There are some Jenkins Plugins I need to install but they are not compatible with the ancient Jenkins version you are using. I hope we can get more frequent (or better automated) updates for Jenkins.

Current Version:
1.509.1 (February 2013)

Newest Version:
1.554.1 (May 2014)

Comment 1 Ben Parees 2014-05-20 15:22:30 UTC
We'd been waiting for a new LTS but it looks like one is available now that we can try.  

In the meantime, however, you can provide your own jenkins war file if you wish to run a newer version.  To do so, scp the war into your gear and set the following environment variables:

1) JENKINS_JAR_CACHE_PATH=<OPENSHIFT_DATA_DIR>/.jenkins/cache/jars
2) JENKINS_WAR_PATH=/path/to/your/jenkins.war

Comment 2 recon 2014-05-20 15:56:13 UTC
So, I did scp the .war into /app-root/data/war/jenkins.war and set the war path.
Checked it afterwards:
> echo $JENKINS_WAR_PATH
app-root/data/war/jenkins.war

Set the cache path and checked it:
> echo $JENKINS_JAR_CACHE_PATH
app-root/data/.jenkins/cache/jars
However, that folder does now exists and I can't create it by hand (permission denied).

What am I doing wrong?

Comment 3 recon 2014-05-20 15:57:33 UTC
Forgot to mention that I restarted the CI through the the openshift interface 2 times but it still shows the old version.

Comment 4 Ben Parees 2014-05-20 16:51:21 UTC
1) You did an app restart of the jenkins application?  Can you ssh into the gear and confirm that 
  a) the JENKINS_WAR_PATH is still set
  b) ps axwww | grep java  to confirm the war file path being used by the jenkins process

2) I'm not sure, i'm able to create that directory without issue after ssh'ing into my jenkins gear:
[jenkins-bparees.dev.rhcloud.com 537bbf1852e31ae7fa000017]\> cd app-root/data/
[jenkins-bparees.dev.rhcloud.com data]\> mkdir -p .jenkins/cache/jars
[jenkins-bparees.dev.rhcloud.com data]\> ls -l .jenkins/cache/jars
total 0

Comment 5 recon 2014-05-20 16:59:18 UTC
1.a)
Still set:
> echo $JENKINS_WAR_PATH
/var/lib/openshift/537b7f6b4382ece777000656/app-root/data/jenkins.war
I tried both the absolute path (see above) and just /app-root/data/jenkins.war

1.b)
Here comes the problem... It doesn't use my path. It's still using /usr/lib/jenkins/jenkins.war
 ps axwww | grep java
  8221 pts/0    S+     0:00 grep java
524239 ?        Sl     0:22 /etc/alternatives/jre/bin/java -XX:+UseSerialGC -Xms20m -Xmx168m -XX:MaxPermSize=100m -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/openshift/537b7f6b4382ece777000656/app-root/data/ -Dhudson.slaves.NodeProvisioner.recurrencePeriod=500 -Dhudson.slaves.NodeProvisioner.initialDelay=100 -Dhudson.slaves.NodeProvisioner.MARGIN=100 -Dhudson.model.UpdateCenter.never=true -Dhudson.DNSMultiCast.disabled=true -jar /usr/lib/jenkins/jenkins.war --ajp13Port=-1 --controlPort=-1 --logfile=/dev/stdout --httpPort=8080 --handlerCountMax=45 --handlerCountMaxIdle=20 --httpListenAddress=127.3.6.1



2)
Managed to fix that but that doesn't change anything.

Comment 6 Ben Parees 2014-05-20 17:11:15 UTC
how are you restarting the application?  seems like it is not restarting (is the pid changing?)

Comment 7 recon 2014-05-20 17:15:50 UTC
Through the web ui: http://i.imgur.com/7wC4PE6.png
The PID is changing but it always uses the default .war file instead of mine.

Comment 8 Ben Parees 2014-05-20 17:41:12 UTC
how did you set the env var?

Comment 9 recon 2014-05-20 17:43:02 UTC
I used the default way with "export".

Comment 10 Ben Parees 2014-05-20 17:50:41 UTC
that is why.  you need to set it via openshift.  From the command line, you can run "rhc set-env JENKINS_WAR_PATH=/path -a <your_app_name>"

Comment 11 recon 2014-05-20 18:03:03 UTC
Wow, I feel stupid now. Didn't know that I have to set env vars that way.
Works! Sorry for wasting your time and thanks for explaining everything.

Comment 12 Ben Parees 2014-05-20 18:06:30 UTC
no problem, glad to help.

we'll try to get jenkins updated shortly as well so you don't have to do this.


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