-
Bug
-
Resolution: Fixed
-
Minor
-
None
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.