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

Take subtasks into account when deciding to provision new nodes #742

Merged
merged 1 commit into from Apr 19, 2014

Conversation

diggerk
Copy link
Contributor

@diggerk diggerk commented Mar 21, 2013

My use case is about jobs that span multiple nodes, for distributed testing. With this purpose I extended heavy-job-plugin and installed jclouds-plugin to be able to spin up new slaves as needed.

The only problem is that Jenkins doesn't take subtasks into account when checking if there's a need to spin up new slaves. So when I have a build with 2 subtasks in the queue and 1 available executor, nothing happens as the job can't start and Jenkins doesn't see that there's a need for an additional executor.

I'm proposing to take subtasks into account. Per my understanding of the code it shouldn't have any downsides. The modified version is working well for me currently.

@cloudbees-pull-request-builder

core » jenkins_main_trunk #786 FAILURE
Looks like there's a problem with this pull request

@diggerk
Copy link
Contributor Author

diggerk commented Mar 21, 2013

Build failure reported above is not related to code changes.

@kohsuke kohsuke merged commit af55e53 into jenkinsci:master Apr 19, 2014
kohsuke added a commit that referenced this pull request Apr 19, 2014
Queue length has to count individual SubTask, so that heavy weight jobs
correctly provision required number of slaves through Cloud.
@kohsuke
Copy link
Member

kohsuke commented Apr 19, 2014

My sincere apologies for a long delay, but I finally merged it toward 1.561.

@thomassuckow
Copy link
Contributor

This change modifies the behaviour of countBuildableItemsFor(Label l) such that when label is null is counts EVERYTHING.

UnlabeledLoadStatistics uses null to track the number of "free roam" jobs.
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/jenkins/model/UnlabeledLoadStatistics.java#L74

This could have unintended consequences of NodeProvisioner starting slaves for jobs that won't use them.

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