Open matejdro opened 5 years ago
AIUI, this is because the docker-plugin spawns the container and returns the results to the Jenkins core before the JNLP connection has been established ... and unfortunately the Jenkins core does not count "under construction" nodes when it's trying to figure out how many more nodes are needed to satisfy demand, so it asks for more, and gets more ... and more...
To stop this, we'd need some code added into the docker plugin's handling of JNLP nodes so that it waited until the JNLP connection was established before it considered its job "complete" (because the docker-plugin has logic to count "under construction" nodes ... but this only applies to nodes it has yet to return to the Jenkins core).
...and this would probably be best done after #757 is resolved, because that'll deal with other race conditions that'll make this tricky.
Jenkins 2.182 Docker plugin 1.1.6 Docker engine 18.09.7
I set up one container template with specific label (
testtag
in this case). Container uses JNLP as connection mechanism.After starting ONE build that requires this node label, docker plugin will apparently keep spinning up new instances until first instance is booted up and ready to work.
From jenkins logs:
Note that
Asked to provision 1 slave(s)
keeps repeating, even though a slave is already being provisioned. This keeps repeating until first container is booted up and job starts executing.