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

Global limit of maximum agents that can be dynamically allocated in a docker swarm

    • Icon: Improvement Improvement
    • Resolution: Not A Defect
    • Icon: Major Major
    • docker-swarm-plugin
    • Docker: 17.04-ce
      Linux: OpenSUSE
      Jenkins: 2.111
      Docker Swarm Plugin: 1.5

      We have been using this plugin to dynamically provision our agents in a docker container for our builds. Everything has been working quite well so far! However, the is one small issue we're hitting - you can have unlimited jobs which request agents. This is an awesome feature, but our bare-metal cloud is definitely not unlimited so we eventually hit the limit to the machines every now and then.  

      Would it be possible to have a field in which you can set a global limit for the maximum amount of containers the swarm can handle? And when you get over the limit the plugin would wait until the running containers are below that number.

          [JENKINS-50432] Global limit of maximum agents that can be dynamically allocated in a docker swarm

          surya gaddipati added a comment - - edited

          Hi Steve, 

           

          You can set limits and reservations per label ( see attached: screenshot).   We do this to avoid scheduling unlimited number for containers. 

           

          Let me know if that solves the problem you are facing.

          surya gaddipati added a comment - - edited Hi Steve,    You can set limits and reservations per label ( see attached: screenshot).   We do this to avoid scheduling unlimited number for containers.    Let me know if that solves the problem you are facing.

          Steve Todorov added a comment -

          surya548 thank you very much for your reply. This seems to be solving the issue so far. We were using the `limit` without `reserve` which was causing the issue. I think we can close this now. 

          Steve Todorov added a comment - surya548 thank you very much for your reply. This seems to be solving the issue so far. We were using the `limit` without `reserve` which was causing the issue. I think we can close this now. 

            surya548 surya gaddipati
            stodorov Steve Todorov
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: