path: root/per-service
diff options
authorPaul Sokolovsky <>2016-03-02 17:34:25 +0200
committerPaul Sokolovsky <>2016-03-03 10:06:30 +0000
commit1036f24d8ffdbaea8483172dbed35a9f07db3468 (patch)
tree21e5af17466c7e23e58c9542e7c4069ac9cd6d67 /per-service
parentbc140964e9f808a46034bafab084ac2195712bda (diff)
jenkins: Configure Jetty session timeout to 8hrs.
The default is 30 mins, which is the source of session timeout issues previously attributed to Crowd plugin. Note that this switches Ansible to set Jenkins parameters in /etc/defaults/jenkins to a value from playbook, instead of trying to append to it using regex magic getting more and more dirty. This should be ok, just occasionally need to pay attention on upgrades (hopefully, there's little a new package version can bring on that side). Change-Id: Ia92b6eee2dd81623a5bb1a11ec7a3d27064c7b7e Reviewed-on: Reviewed-by: Ben Copeland <>
Diffstat (limited to 'per-service')
1 files changed, 4 insertions, 9 deletions
diff --git a/per-service/jenkins/roles/jenkins/tasks/jenkins-pkgs.yml b/per-service/jenkins/roles/jenkins/tasks/jenkins-pkgs.yml
index 66319ed..a20442d 100644
--- a/per-service/jenkins/roles/jenkins/tasks/jenkins-pkgs.yml
+++ b/per-service/jenkins/roles/jenkins/tasks/jenkins-pkgs.yml
@@ -39,15 +39,10 @@
lineinfile: regexp="^HTTP_PORT=" line="HTTP_PORT={{jenkins_port}}" dest=/etc/default/jenkins backup=yes
when: jenkins_port != 8080
-- name: Configure Jenkins URL prefix
- # Note: Apache and Jenkins prefixes must match! (mod_proxy is not smart enough
- # to rewrite links in HTML, and mod_proxy_html is a chore to run.)
- # Add --prefix= arg to existing args if not there yet
- lineinfile: regexp='^JENKINS_ARGS=(?!.*--prefix=/jenkins)"?(.+?)"?$'
- line='JENKINS_ARGS="\1 --prefix={{jenkins_prefix}}"'
- dest=/etc/default/jenkins backrefs=yes
- when: jenkins_prefix != "/"
+- name: Configure Jenkins startup parameters
+ lineinfile: regexp='^JENKINS_ARGS=.+'
+ line='JENKINS_ARGS="--webroot=/var/cache/jenkins/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT --prefix={{jenkins_prefix}} --sessionTimeout=480"'
+ dest=/etc/default/jenkins backup=yes
- name: Set Java properties required to tweak Jenkins behavior
# org.jenkinsci.plugins.gitclient.Git.timeOut set here as a