Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant aborted at end of Jenkins job

I've been having this problem for a while. Vagrant boxes abort at the end of a Jenkins job. I've limited the job to just a script with

vagrant up
sleep 60

For 60 seconds vagrant boxes are running, but the second the job finishes vagrant boxes are aborted.

like image 792
Kyle Avatar asked Nov 01 '13 23:11

Kyle


1 Answers

This behaviour is caused by the Jenkins process tree killer. I got it to work by running Jenkins as follows:

java -Dhudson.util.ProcessTree.disable=true -jar jenkins-1.537.war

Another (less global) work-around is to run vagrant as follows:

BUILD_ID=dontKillMe vagrant up

Makes sense in retrospect. Processes launched by a Jenkins job should be cleaned up at the end. Of course this would be a "gotcha" is you're attempting to use Jenkins to launch long running processes.

+1 for this question.

like image 90
Mark O'Connor Avatar answered Sep 29 '22 21:09

Mark O'Connor