[JENKINS-47821] Prevent run-once slave from accepting more jobs.#91
Merged
pjdarton merged 1 commit intojenkinsci:masterfrom Apr 4, 2018
Merged
Conversation
vSphereCloudSlaveTemplate - now provides each cloud slave it creates with its own RetentionStrategy instance, being a copy of the template's rather than being the same instance. This allows us to simplify RunOnceCloudRetentionStrategy's implementation as it's no longer shared. RunOnceCloudRetentionStrategy - can no longer be shared between slaves. It now only holds state information about one slave. See also: vSphereCloudSlaveTemplate changes. - now overrides isAcceptingTasks to prevent further activity instead of simply setting c.setAcceptingTasks(false). - now triggers node termination in-line instead of spawning a new thread for it. We can do this without slowing Jenkins down because our nodes ask vSphere to delete their VMs in a separate thread. Hopefully this should fix the re-use bug. - offline reasons now given as a VSphereOfflineCause that can be localized. See also: vSphereCloudLauncher changes. vSphereCloudSlave - flyweight-task refusal message can now be localized. - offline reasons now given as a VSphereOfflineCause that can be localized. See also: vSphereCloudLauncher changes. vSphereCloudLauncher - no longer uses the special text "vSphere Plugin" in the offline reason to recognise our own offline reasons. Our code uses now VSphereOfflineCause and so we can now use instanceof to detect these instead of String.contains.
Member
Author
|
I've been running a plugin with these changes in for a week now and it all seems fine to me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vSphereCloudSlaveTemplate
RunOnceCloudRetentionStrategy
this should fix the re-use bug.
vSphereCloudSlave
vSphereCloudLauncher
instead of String.contains.