https://projects.osmocom.org/https://projects.osmocom.org/favicon.ico?16647414092019-05-08T13:58:27ZOpen Source Mobile CommunicationsCellular Network Infrastructure - Bug #3660: TTCN3 Jenkins jobs leave Docker containers running when stoppedhttps://projects.osmocom.org/issues/3660?journal_id=142602019-05-08T13:58:27Zlaforge
<ul></ul><p>please at the very least submit a bug report at Jenkins to get the discussion going upstream. If we had done that 7 months ago, a fix might already exist today.</p> Cellular Network Infrastructure - Bug #3660: TTCN3 Jenkins jobs leave Docker containers running when stoppedhttps://projects.osmocom.org/issues/3660?journal_id=143732019-05-09T10:03:17Zosmith
<ul></ul><p>Sorry for the delay, I've done the research to prepare a bug report now. Turns out that a related pull request has been merged to jenkins master in August 2018 (so it must be in the version we are running already):</p>
<blockquote>
<p>[JENKINS-17116] - When aborting a build, wait up to 2min for process termination</p>
<p>When a build is aborted by the user, Jenkins will now gracefully terminate involved processes by giving it up to 30 seconds time to exit after having received SIGTERM (on Linux) or Ctrl+C on Windows.<br />...</p>
</blockquote>
<p><a class="external" href="https://github.com/jenkinsci/jenkins/pull/3414">https://github.com/jenkinsci/jenkins/pull/3414</a></p>
<p>Here is the related issue:<br /><a class="external" href="https://issues.jenkins-ci.org/browse/JENKINS-17116">https://issues.jenkins-ci.org/browse/JENKINS-17116</a></p>
<p>The issue is in the "in review" state, which means they are waiting for people to confirm that it works as expected, as I understand. I have tested on our jenkins, whether this works, and it does not work. So I've replied in detail to that issue:<br /><a class="external" href="https://issues.jenkins-ci.org/browse/JENKINS-17116?focusedCommentId=366455&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-366455">https://issues.jenkins-ci.org/browse/JENKINS-17116?focusedCommentId=366455&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-366455</a></p>
<p>Test job result:<br /><a class="external" href="https://jenkins.osmocom.org/jenkins/job/TEST_trap_in_jenkins_job/8/console">https://jenkins.osmocom.org/jenkins/job/TEST_trap_in_jenkins_job/8/console</a></p> Cellular Network Infrastructure - Bug #3660: TTCN3 Jenkins jobs leave Docker containers running when stoppedhttps://projects.osmocom.org/issues/3660?journal_id=162112019-10-11T13:04:18Zosmith
<ul><li><b>Checklist item</b> <input type='checkbox' class='checklist-checkbox' checked disabled> <i>fix lands in jenkins master</i> added</li><li><b>Checklist item</b> <input type='checkbox' class='checklist-checkbox' disabled> <i>fix lands in jenkins release</i> added</li><li><b>Checklist item</b> <input type='checkbox' class='checklist-checkbox' disabled> <i>release with fix is deployed on jenkins.osmocom.org</i> added</li><li><b>Checklist item</b> <input type='checkbox' class='checklist-checkbox' disabled> <i>verify that trap with cleanup function on TERM is working now</i> added</li><li><b>Checklist item</b> <input type='checkbox' class='checklist-checkbox' disabled> <i>write proper cleanup function to stop docker containers and use it in the jenkins.sh scripts of docker-playground.git</i> added</li><li><strong>% Done</strong> changed from <i>0</i> to <i>20</i></li></ul><p>The ticket was marked as solved, and a patch had been merged that should make it possible to write a cleanup function and trap on it:</p>
<p><a class="external" href="https://github.com/jenkinsci/jenkins/pull/4225">https://github.com/jenkinsci/jenkins/pull/4225</a></p> Cellular Network Infrastructure - Bug #3660: TTCN3 Jenkins jobs leave Docker containers running when stoppedhttps://projects.osmocom.org/issues/3660?journal_id=166052019-12-01T09:31:41Zlaforge
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Stalled</i></li></ul><p>the fix was introduced to jenkins 2.199, and rejected for 2.190.2 which we are running on. Seems like we need to wait for a major jenkins upgrade on our side :/</p> Cellular Network Infrastructure - Bug #3660: TTCN3 Jenkins jobs leave Docker containers running when stoppedhttps://projects.osmocom.org/issues/3660?journal_id=271272023-06-20T15:16:44Zosmith
<ul><li><strong>Status</strong> changed from <i>Stalled</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>20</i> to <i>100</i></li></ul>I've verified that this is fixed now:
<ul>
<li>started a testsuite job</li>
<li>checked with "docker ps" over ssh that a new container is running</li>
<li>stopped the jenkins job</li>
<li>checked with "docker ps" that the docker container was stopped</li>
</ul>