That is a well known issue with the Jenkins cloud API. The starting of slaves 
is dependent on the load statistics which take a while to convince Jenkins it 
should start a new slave. Effectively you can think of Jenkins trying to guess 
if the first jobs will finish soon and that it is "better" to wait and reuse 
the slave instead of start a new one which has overhead costs. After several 
minutes it "gives up" and starts one anyway.

I could be lead to believe it works great when you have a multitude of slaves 
coming and going all the time. But when your number of active jobs is low or if 
you have one-shot slaves the load statistics just make a mess of things.

--
Thomas Suckow

From: 
<[email protected]<mailto:[email protected]>> on 
behalf of Ilya Levin <[email protected]<mailto:[email protected]>>
Reply-To: 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Date: Monday, April 4, 2016 at 12:17 AM
To: Jenkins Users 
<[email protected]<mailto:[email protected]>>
Subject: Amazon EC2 Plugin not starting new instances

Hi,

I've encountered a strange behavior after working with the ec2 plugin for a 
while.

I've set my instances to NOT terminate but to stop when idle for an hour.

The strange scenario is this:

I have 4 stopped ec2 instances, each have 2 executors.
4 jobs have entered the Jenkins queue. They are all set to run on a label 
containing the 4 instances above.
1 instance has started and 2 jobs are now running on it.

Now i expect since i have 2 more jobs in the queue another instance to start 
immediately, BUT in fact the plugin
is not starting the other instance but wait for ~8 minutes before he decided to 
start the instance, so in fact i lost 8 minutes of work.

Is this configurable ?
Any suggestions?

Thanks!
Ilyal




--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5b54ba1b-60ee-420d-b100-89fab053be8e%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/5b54ba1b-60ee-420d-b100-89fab053be8e%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/D327D718.29C73%25thomas.suckow%40pnnl.gov.
For more options, visit https://groups.google.com/d/optout.

Reply via email to