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

Possibility to remove VM instance immediately after build finish (1build: 1vm rule)

    Details

    • Similar Issues:

      Description

      It will be nice to have possibility to kill VM immediately after build finish. It will allow us to make sure only one build is executed on clean-well defined VM. Sometimes builds change the state of the vm(they shouldn't - but sometimes happen from many reasons) and it will be nice to have way to enforce new VM each time.

      Right now when some build wait in the queue for executor, after finish some other job related with that label new build will be spawned on the same machine(VM) that previous one finish.

      Right now we have field: "Node Retention Time" but looking at the description setting this as "0" doesn't sounds like good idea.

      It will be nice to have for example checkbox.

        Attachments

          Activity

          Hide
          crazybus Michael Russell added a comment -

          Have you tried using the Single Use Slave Plugin?

          This plugin is intended to be used with external tools like Nodepool, which has the ability to spin up slaves on demand and then reap them when Jenkins has run a job on them. This plugin is needed because there is a race condition between when the job completes and when the external tool is able to reap the node. This plugin addresses the race condition by intercepting the build complete notifications generated internally to Jenkins and offlining relevant nodes before another job can be schedule on them.

          I'm not sure if the race condition they are referring to is a specific problem with the Nodepool plugin or just in general with jenkins plugins. In any case this plugin combined with google-compute-engine-plugin is working great for me.

          Show
          crazybus Michael Russell added a comment - Have you tried using the Single Use Slave Plugin ? This plugin is intended to be used with external tools like Nodepool, which has the ability to spin up slaves on demand and then reap them when Jenkins has run a job on them. This plugin is needed because there is a race condition between when the job completes and when the external tool is able to reap the node. This plugin addresses the race condition by intercepting the build complete notifications generated internally to Jenkins and offlining relevant nodes before another job can be schedule on them. I'm not sure if the race condition they are referring to is a specific problem with the Nodepool plugin or just in general with jenkins plugins. In any case this plugin combined with google-compute-engine-plugin is working great for me.
          Hide
          ingwar Karol Lassak added a comment -

          Sadly Single Use Slave Plugin does not work for pipelines..

          For pipelines another approach is needed..

          Show
          ingwar Karol Lassak added a comment - Sadly  Single Use Slave Plugin  does not work for pipelines.. For pipelines another approach is needed..

            People

            • Assignee:
              zombiemoose Rachel Yen
              Reporter:
              ntargosz Norbert Targosz
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: