trigger jobs on unwanted slaves
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Jenkins Gearman Plugin |
Fix Released
|
Undecided
|
Khai Do |
Bug Description
The Jenkins slaves can be configured to only run jobs which are tied to it either by the node name or the labels applied to it. When a Gearman jobs is received without a label (ie: build:$
I have upgraded Wikimedia Zuul setup earlier today and prompty had to revert back because of that. An abstracted out version of the Wikimedia setup is:
Jenkins servers:
master: does not execute any job
slave-tester:
- no label
- testing utilities installed
slave-deployer:
- has label 'deploy'
- node configuration has Usage: Leave this machine for tied jobs only
Jobs:
- project-test (no specific label)
- project-deploy (labeled 'deploy')
When Zuul got upgraded, the `build:
I haven't tried out what would happen if a Jenkins job is tied
I suspect the issue is in ExecutorWorkerT
Changed in gearman-plugin: | |
assignee: | nobody → Khai Do (zaro0508) |
status: | New → Triaged |
Changed in gearman-plugin: | |
status: | In Progress → Fix Released |
Following a conversation with Khai Do:
There is an option on slave nodes to prevent them from running jobs that are not explicitly tied for them. That shows up in the node configuration as Usage: …
A real life use case is having a slave with node.js package manager npm. That slave does not have any other utilities and thus is dedicated to run javascript tests. The slave receives label hasNpm and is restricted to only run jobs explicitly tied to it.
In Jenkins config.xml the Usage: menu generate a <mode /> entry that takes either NORMAL or EXCLUSIVE has a value.
The Jenkins model Node has a canTake( Task ) method which is used by the queue to find out whether a node is able to launch it. Might want to reuse that logic?