-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ephemeral autoscaling does not work, idle runners always at maximum #2449
Comments
idle_config is not meant for ephemeral runners. But for non ephemeral runners. The idle config is used by the scale down runner to decide to kill a runner or not. You can use the pool for having some warm runners in combination with ephemeral. |
@npalm I've tried the pool block as well, but it always stays at the
how do I scale the runners down when I have no pending jobs in the queue? |
Creating a pool will create every time the function is triggered based on the schedule runners. It first looks up the number of idle runners, and next top up in your case to 5. The scale down lambda can shutdown you pool runners. Based on an minimal running time. |
Could you please rephrase your comment? Please take a look at the config that we are using: # Uncomment to enable ephemeral runners
delay_webhook_event = 0
enable_ephemeral_runners = true
enabled_userdata = false
minimum_running_time_in_minutes = 5
runners_maximum_count = 3
enable_job_queued_check = true
# Uncommet idle config to have idle runners from 9 to 5 in time zone Amsterdam
#idle_config = [{
# cron = "* * 9-17 * * 1-5"
# timeZone = "Europe/Amsterdam"
# idleCount = 3
#}]
pool_runner_owner = "<redacted>" # Org to which the runners are added
pool_config = [{
size = 3 # size of the pool
schedule_expression = "cron(* * * * ? *)" # cron expression to trigger the adjustment of the pool
}]
scale_down_schedule_expression = "cron(*/5 * * * ? *)" Can you clarify what cause 6 runners to be spawned if we set Can you take a look at above provided config and clarify that this is valid? We also understand that |
M1kep Would be great if you have time to submit a PR. I thought the issue is the pool lambda is not seeing instances that are created but not ready yet. So assuming you running the pool lambda every minute, and creating an instance takes 2 minutes you can easy end up with 2 or 3 times the size of the pool |
@M1kep @npalm faced the same issue. I had a monitor that controls the amount of EC2 spawn and never honored the It will be nice if can understand/sum the running instances + the pending ones in order to understand the maximum you wanna run and keep costs under control |
Was this fixed by https://github.com/philips-labs/terraform-aws-github-runner/pull/2801 ? |
We are trying to setup autoscaling using Ephemeral runners flag, It seems that the lambda function never scales runners down and always keeps the runners at the value of
runners_maximum_count
that we have set.for example, if we set
runners_maximum_count
to20
, then exactly20
will be idle all the time, no matter if we have any pending jobs or notversion is
v1.8.1
,using prebuilt AWS AMI
ubuntu-jammy-22.04-amd64-server
related configuration below
could you please advice if this is a bug or misconfiguration from our side?
let me know if more information is required
The text was updated successfully, but these errors were encountered: