Status: Closed (View Workflow)
Swarm Plugin and Jar: 3.6
Currently when -labelsFile file changes, the client is blindly restarted, interrupting any running jobs. In my opinion, the only advantage of -labelsFile flag is to eliminate the need to restart the client for label changes and therefore avoid interrupting jobs.
Currently my puppet instrumentation updates the init.d script with any changes to the -labels parameter and then restarts the system service. In order to avoid job interruptions I had to write my own logic that detects the number of running jobs, sets the slave temporarily offline, restarts it once jobs finish, etc. I doubt that my needs are unusual. In this context, the new -labelsFile parameter is not a useful addition unless it can handle all of that.
In other words, it should either:
- Not restart the client but update labels on the fly.
- Restart the client gracefully (when no jobs are running).
(Note that this is different from
JENKINS-45295 where the client stays down for some reason)
JENKINS-45295 Swarm Client should update labels on the fly when labelsFile changes
I am in fact using -disableClientsUniqueId, but I must not have been when I tested this behavior back in 2017.
I just tested and reloading the file works correctly even in 3.15 with that switch, as you pointed out in the PR.
KK does not maintain this plugin anymore. Moving to unassigned to set the expectation