Hello, I'm writing a Jenkins Cloud plug-in that should work similar to EC2 plug-in. The sequence of events is as follows: 1. Jenkins decides that there are not enough slaves to run jobs 2. Jenkins access a private resource manager system to reserve and launch test set-up. The resource manager returns an IP address of the test set-up 3. Jenkins launches slave on the returned IP. 4. The job is executed on the slave 5. Once the job is completed Jenkins kills the slave and updates the resouce manager that the set-up is free.
I have extended Cloud, Slave, ComputerLauncher etc and I have a plugin that does all of the above. However... Jenkins never provisions more than one slave from the resource manager cloud. Looking into the code of NodeProvisioner.update, it seems that the condition *if (idle < MARGIN || needSomeWhenNoneAtAll) {*Is never met once there is one slave in the pool. When there are no slaves, *needSomeWhenNoneAtAll == true* and the *if* clause is executed. When there is one slave, *needSomeWhenNoneAtAll == false* and i*dle > MARGIN* so the *if* clause is not executed. I've found out that MARGIN is set to 0.1 by default with the following code: *private static final float MARGIN = Integer.getInteger(NodeProvisioner.class.getName() + ".MARGIN", 10) / 100f;* I've changed this line to *private static final float MARGIN = Integer.getInteger(NodeProvisioner.class.getName() + ".MARGIN", 100) / 100f;* And forced *idle < MARGIN* so the *if* clause always gets executed and Jenkins launches multiple slaves. *My questions are:*1. Why, by default, *MARGIN* is set to 0.1 so *idle > MARGIN* and Jenkins does not launch more than one slave? 2. How can I change this default behaviour so Jenkins does not wait at all? So as soon as it finds out there is awaiting job it will ask to provision new slave? *Thanks,Yoram* -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.