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

Docker: Standard slaves also counted into container cap

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • docker-plugin
    • None
    • SUSE Linux Enterprise 12 SP1
      jdk1.8.0_60
      Jenkins ver. 1.635
      apache tomcat 7.0.65
      docker-plugin 0.16.0

      Hi folks,

      Setup a Jenkins with docker-plugin. Add a classical (non-dockered) slave to the machine.
      Create a docker configuration, setting the Container Cap to 1 (i.e. only one single container may be run). Create a template, add a label to it. Create two small jobs (simply doing nothing) and assign them to the label. Start the jobs.

      Observed behaviour: No docker slave is started; they are queued.
      Expected behaviour: At least one docker slave is started, processing the first one of the two jobs.

      Adjust the Container Cap to 2.
      Observed behaviour: a docker slave is started.

      If you repeat the entire setup above, leaving out the classical slave, you will notice that also with Container Cap of 1 the docker slave is started.

      (similar to JENKINS-26388)

          [JENKINS-36920] Docker: Standard slaves also counted into container cap

          Nico Schmoigl added a comment -

          Error description is unprecise - correct statement is:

          • The Container Cap simply counts the number of instances running on the docker host
          • Other (non-docker) slaves are not counted

          However, this still makes running a "shared docker host" scenario complicated, as it needs to be ensured that on all attached Jenkins servers, the Container Cap needs to be in sync (otherwise those Jenkins installations which have a lower Container Cap than the currently running number of containers on the docker host will not provision any new slave anymore).

          Thus, closing this ticket.

          Nico Schmoigl added a comment - Error description is unprecise - correct statement is: The Container Cap simply counts the number of instances running on the docker host Other (non-docker) slaves are not counted However, this still makes running a "shared docker host" scenario complicated, as it needs to be ensured that on all attached Jenkins servers, the Container Cap needs to be in sync (otherwise those Jenkins installations which have a lower Container Cap than the currently running number of containers on the docker host will not provision any new slave anymore). Thus, closing this ticket.

            eagle_rainbow Nico Schmoigl
            eagle_rainbow Nico Schmoigl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: