-
Notifications
You must be signed in to change notification settings - Fork 323
Allow randomizing cloud selection #1116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
When multiple Docker clouds are defined, the plugin will always create agents from the first available cloud, not allowing to distribute the load on all the clouds that are defined. Possible solutions to this issue are: - Docker Swarm Standalone, which is deprecated - Docker Engine Swarm API, which is not supported by docker-plugin. This changes adds a setting that enables randomizing the order in which Docker clouds are tried when creating a new agent.
fe793d4 to
f2c6004
Compare
|
I configured two Docker clouds, one a copy of the other, and watched the allocation. As far as I could tell, it was always choosing the first cloud, whether or not the randomization checkbox was enabled. |
|
We're observing the same behavior with 4 Docker clouds configured. Any chance to get this merged (and released) in the near future? |
|
@dhs-rec Have you tried this PR in your case and it worked? |
|
No, I didn't. |
Sorry, I would like to get back to this and re-test it, but I am not able to get to it in the short term. It was working for me when I uploaded the PR. |
|
No worries @cavedon it looks like there is a SpotBugs issue with your code though which needs fixing before we can review it |
When multiple Docker clouds are defined, the plugin will always create agents from the first available cloud, not allowing to distribute the load on all the clouds that are defined.
Possible solutions to this issue are:
This changes adds a setting that enables randomizing the order in which Docker clouds are tried when creating a new agent.
Testing done
Tested on a Jenkins instance with two Docker clouds defined, with the setting enabled and disables.
I did not find existing unit tests coverage for FastNodeProvisionerStrategy where to add my tests...
Submitter checklist