You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When minimum spare instances is set - the instances do not deprovision regardless of the demand.
Describe the bug
When I use any number in minimum spare instances, the fleets do not change their size to a lower size. They go up to the maximum limit and stay at that limit even though there is no load / demand for the fleet.
To Reproduce
Create cloud fleet with following parameters:
Minimum Cluster Size - 1
Maximum Cluster Size - 200
Minimum spare size - 5
Create another cloud fleet with simillar parameters
Run some jobs on those workers, give some load so that the plugin scales the fleet to almost max.
Run some jobs on the second worker
After workload is done on the first fleet, and no further workload is given to the first fleet, we expect the plugin to rescale down to 5 nodes. It did not rescale at all and will be left at 200.
etc.
Environment Details
Plugin Version?
2.5.1
Jenkins Version?
2.319.3
Spot Fleet or ASG?
Spot Fleet
Label based fleet?
Yes
Linux or Windows?
Linux
EC2Fleet Configuration as Code We do not use JCasC.
Anything else unique about your setup?
No
The text was updated successfully, but these errors were encountered:
Why this is happening? Ec2FleetCloud.java:844 - getCurrentSpareInstanceCount
uses enkins.get().getComputers()
and checks: if (computer instanceof EC2FleetNodeComputer && !computer.isIdle())
to check how many workers are busy.
Just as a recap method should return a number of currently available spare instances for given fleet. This method is used to determine whether there should be a descaling action performed.
Instead this function calculates the number of available instances via following equation:
countOfInstances - currentBusyInstances
where:
countOfInstances is a number of instances in a fleet (from FleetStateStats) - this is correct
currentBusyInstances - number of busy instances on a whole jenkins instances, not only within one given fleet
This is okay if we have one fleet only, and no local workers
This would not work if we have either:
When minimum spare instances is set - the instances do not deprovision regardless of the demand.
Describe the bug
When I use any number in minimum spare instances, the fleets do not change their size to a lower size. They go up to the maximum limit and stay at that limit even though there is no load / demand for the fleet.
To Reproduce
Minimum Cluster Size - 1
Maximum Cluster Size - 200
Minimum spare size - 5
etc.
Environment Details
Plugin Version?
2.5.1
Jenkins Version?
2.319.3
Spot Fleet or ASG?
Spot Fleet
Label based fleet?
Yes
Linux or Windows?
Linux
EC2Fleet Configuration as Code
We do not use JCasC.
Anything else unique about your setup?
No
The text was updated successfully, but these errors were encountered: