Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40019

slave containers are not cleaned up.

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: docker-slaves-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.27
      docker-slaves-plugin 1.0.5
    • Similar Issues:

      Description

      The main slave containers are not removed after job completes...

      # docker ps -a
      CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                       PORTS               NAMES
      61c83a8fd3e2        jenkinsci/slave     "java -Djava.io.tmpdi"   9 minutes ago       Exited (0) 9 minutes ago                         thirsty_ardinghelli
      ffee427d5c00        jenkinsci/slave     "java -Djava.io.tmpdi"   9 minutes ago       Exited (0) 9 minutes ago                         distracted_perlman
      b25cef18c35f        jenkinsci/slave     "java -Djava.io.tmpdi"   10 minutes ago      Exited (0) 9 minutes ago                         nostalgic_meninsky
      2116b508126b        jenkinsci/slave     "java -Djava.io.tmpdi"   19 hours ago        Exited (0) 19 hours ago                          happy_leakey
      bccec6db5efd        jenkinsci/slave     "java -Djava.io.tmpdi"   19 hours ago        Exited (0) 19 hours ago                          tender_ramanujan
      c52ea168536d        jenkinsci/slave     "java -Djava.io.tmpdi"   23 hours ago        Exited (143) 1 seconds ago                       berserk_knuth
      fbf52b0bc679        jenkinsci/slave     "java -Djava.io.tmpdi"   23 hours ago        Exited (0) 23 hours ago                          determined_cori
      ee3b6b237803        jenkinsci/slave     "java -Djava.io.tmpdi"   23 hours ago        Exited (0) 23 hours ago                          drunk_joliot
      a505c09916ad        jenkinsci/slave     "java -Djava.io.tmpdi"   23 hours ago        Exited (0) 23 hours ago                          desperate_lalande
      

        Attachments

          Activity

          Hide
          thecelavi Nikola Svitlica added a comment -

          Oh, this is killing us! None of the slaves does not gets cleaned up after build...

          Show
          thecelavi Nikola Svitlica added a comment - Oh, this is killing us! None of the slaves does not gets cleaned up after build...
          Hide
          thecelavi Nikola Svitlica added a comment -

          This is extremely stupid issue, until it is fixed, quick fix is to add a crontab which would do a cleanup of unwanted containers:

          0 * * * * root docker rm $(docker ps -q -f status=exited -f ancestor=jenkinsci/slave)

          This will remove all exited containers that are jenkin slaves - every hour (you can setup yours as you like)

          Show
          thecelavi Nikola Svitlica added a comment - This is extremely stupid issue, until it is fixed, quick fix is to add a crontab which would do a cleanup of unwanted containers: 0 * * * * root docker rm $(docker ps -q -f status=exited -f ancestor=jenkinsci/slave) This will remove all exited containers that are jenkin slaves - every hour (you can setup yours as you like)
          Hide
          sparsick Sandra Parsick added a comment -

          It would be nice if the corresponded volumes to the exited containers will also be cleaned up.

          Show
          sparsick Sandra Parsick added a comment - It would be nice if the corresponded volumes to the exited containers will also be cleaned up.
          Hide
          ndeloof Nicolas De Loof added a comment -

          fixed by 714155ffe1c2d0197cf9b482f62153857a43f4df

          Show
          ndeloof Nicolas De Loof added a comment - fixed by 714155ffe1c2d0197cf9b482f62153857a43f4df

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              agrnwd Andrew Greenwood
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: