Le 28/02/2014 18:55, Mark Holmquist a écrit :
marktraceur@midvalley-the-hornfreak:~/projects/wikimedia/integration/jenkins-job-builder$ jenkins-jobs --conf etc/jenkins_jobs.ini update config/ 'mwext-MultimediaViewer-do-something' INFO:root:Updating jobs in config/ (['mwext-MultimediaViewer-do-something']) INFO:jenkins_jobs.builder:Creating jenkins job mwext-MultimediaViewer-do-something https://integration.wikimedia.org/ci/createItem?name=mwext-MultimediaViewer-...
<snip stack trace>
jenkins.JenkinsException: create[mwext-MultimediaViewer-do-something] failed marktraceur@midvalley-the-hornfreak:~/projects/wikimedia/integration/jenkins-job-builder$
I just made a dummy job - commit here: https://gerrit.wikimedia.org/r/116123
Obviously nothing special, but the issue is in the HTTP request code anyway.
Hi,
Jenkins jobs builder use the python-jenkins module check for the existence of jobs using a simple GET request:
GET /ci/job/mwext-MultimediaViewer-do-something/api/json?tree=name
That throws a 404 and JJB then create the job:
POST /ci/createItem?name=mwext-MultimediaViewer-do-something
python-jenkins then verify the job got created using the GET request above. I found out tonight that our misc Varnish caches the 404 error for up to a minute, and hence the second GET is being served the cached 404 by Varnish. End result JJB consider the job hasn't been created and bails out with the above stack trace.
The way to fix it: stop caching 404 on the misc varnish, at least when using the gallium backend. There is a cache4xx parameters to the varnish::instance puppet class. Will have to checkout out with some Varnish guru how to best fix it.
Meanwhile I am entering sleep() mode..