Skip to content
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

Allow randomizing cloud selection #1116

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cavedon
Copy link

@cavedon cavedon commented Nov 13, 2024

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.

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

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@cavedon cavedon requested a review from a team as a code owner November 13, 2024 19:19
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.
@MarkEWaite
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants