[JIRA] (JENKINS-50931) EC2 Instance cap is not respected

5 views
Skip to first unread message

athol.birtley@settify.com.au (JIRA)

unread,
Apr 23, 2018, 12:07:02 AM4/23/18
to jenkinsc...@googlegroups.com
A B created an issue
 
Jenkins / Bug JENKINS-50931
EC2 Instance cap is not respected
Issue Type: Bug Bug
Assignee: Francis Upton
Attachments: 1 - Configure EC2 plugin.png, 2 - Multiple instances are launched.png, 3 - Software versions.png
Components: ec2-plugin
Created: 2018-04-23 04:06
Environment: Jenkins version: 2.107.1
ec2-plugin version: 1.39
Java version: 8u151
OS: Linux (4.4.0-1052-aws)
Labels: ec2 ec2-plugin aws configuration
Priority: Major Major
Reporter: A B

In Manage Jenkins -> Configure System -> Cloud -> Advanced, I set "Instance Cap" to 5

I push changes to many branches (more than 5)

In the sidebar, I see that more than 5 instances have been created.

I expected that a maximum of 5 instances would be created.

I am using EC2 spot instances in the ap-southeast-2 region. I have only one 'cloud' set up, and all the instances are building (different branches of) the same job.

Please let me know if any other information would be helpful.

(I see that this bug has been reported previously, but closed. Is this a regression? Am I doing something wrong?)

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

athol.birtley@settify.com.au (JIRA)

unread,
Jun 14, 2018, 9:26:02 PM6/14/18
to jenkinsc...@googlegroups.com
A B commented on Bug JENKINS-50931
 
Re: EC2 Instance cap is not respected

Further monitoring suggests that the cap seems to struggle when multiple builds enter the queue simultaneously (or close to simultaneously). It looks like perhaps the plugin doesn't keep track of instances it has requested, only instances that are in the process of starting. So, if there's a lag between request and starting, it can request too many instances.

That's just how it appears from the outside - I haven't examined the source code. Workaround for now is to set the instance cap at about half what you actually want it to be, and hope it doesn't exceed your true desired cap by too much.

athol.birtley@settify.com.au (JIRA)

unread,
Dec 3, 2018, 5:32:02 PM12/3/18
to jenkinsc...@googlegroups.com
A B commented on Bug JENKINS-50931

An update - the problem is definitely getting worse. With an instance cap of 1, I am routinely getting 10 or more slaves starting up. Only thing that has changed is AWS (I haven't changed the Jenkins configuration at all).

 

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

fabrizio.manfredi@gmail.com (JIRA)

unread,
Aug 11, 2019, 7:29:03 AM8/11/19
to jenkinsc...@googlegroups.com
FABRIZIO MANFREDI closed an issue as Fixed
 
Change By: FABRIZIO MANFREDI
Status: Open Closed
Resolution: Fixed
Released As: 1.45
Reply all
Reply to author
Forward
0 new messages