Open Source Mobile Communications: Issueshttps://osmocom.org/https://osmocom.org/favicon.ico?15286125692018-10-17T09:26:36ZOpen Source Mobile Communications
Redmine Cellular Network Infrastructure - Bug #3660 (New): TTCN3 Jenkins jobs leave Docker containers run...https://osmocom.org/issues/36602018-10-17T09:26:36Zosmith
<p>The jenkins.sh scripts start multiple containers and stops them at the end of the script. When aborting a job with the web interface, the script gets killed and can not do the clean up part. <a href="https://wiki.jenkins.io/display/JENKINS/ProcessTreeKiller" class="external">Jenkins kills all child processes</a>, but not the containers as they get spawned by the docker daemon.</p>
Ideas to resolve this:
<ul>
<li>open a bug report at Jenkins to not kill processes with -9 in a bug report, then wait for a stable release with the fix, then implement clean up on receiving SIGABRT in jenkins.sh</li>
<li>try out the <a href="https://wiki.jenkins.io/display/JENKINS/PostBuildScript+Plugin" class="external">PostBuildScript Plugin</a> (or <a href="https://wiki.jenkins-ci.org/display/JENKINS/Post+build+task" class="external">Post build task</a>, that <a href="https://stackoverflow.com/a/25543380" class="external">should work</a> for sure), see if they allow executing code on abort of the job</li>
<li>try to attach the environment variable that jenkins is using to decide which processes will be killed (see link above) to the processes in the Docker containers</li>
</ul>