Wrong calculation of running Template agents when using the same image on multiple templates #816
Open
3 tasks done
Labels
bug
An issue reporting a bug or a PR fixing one.
In
com.nirima.jenkins.plugins.docker.DockerCloud
incanAddProvisionedSlave()
, an estimation of running template agents is done.This is done by counting the running containers using the same image as the template image, which is wrong since multiple templates of the same cloud can use the same Docker image.
In my case, I have 2 templates (A and B) with the same Docker image, but different container capacities (2 and 5) and different agent labels (for limiting the builds). When the running containers count equals the container capacity of template A (cap=2),
canAddProvisionedSlave()
also returnsfalse
for template B (cap=5), even though it has no running agents and should have enough capacity to provision up to 5 agents.It may be fixed by adding a template label to each container and add a filter on this label to count running template agents?
The text was updated successfully, but these errors were encountered: