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

Starvation can occur if job isn't restricted

XMLWordPrintable

      Thanks to JENKINS-38196 we allow to provision a node for Label=null. It is valid use-case, however it doesn't work as supposed. Jenkins isn't able to schedule run in the queue which isn't restricted to any label to the node which has EXCLUSIVE mode set on. Although we will not use EXCLUSIVE mode if label isn't specified (JENKINS-38366), is isn't sufficient.

      The real (starvation) scenario:

      • run without restriction appended to the queue
      • canProvision() returns true if it has at least one available node
      • master asks for provision that node
      • from Foreman, node has set labels and instances as EXCLUSIVE
      • master is unable to put the item above to it

      Although there can be couple of nodes defined in the Foreman instance, situation above can repeat forever and such a job can starve in the queue indefinitely. So if Label=null we should provision only node without any label defined/associated and with non-exclusive mode.

            pajasoft Pavel Janoušek
            pajasoft Pavel Janoušek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: