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

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

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: docker-swarm-plugin
    • Labels:
    • Environment:
      Docker: 17.04-ce
      Linux: OpenSUSE
      Jenkins: 2.111
      Docker Swarm Plugin: 1.5
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          surya548 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.

          Show
          surya548 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.
          Hide
          stodorov Steve Todorov added a comment -

          surya gaddipati 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. 

          Show
          stodorov Steve Todorov added a comment - surya gaddipati 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. 

            People

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

              Dates

              • Created:
                Updated: