I have setup autoscaling with openstack on ovh with different idle time depending to the period and one max of 1800 seconds. But the runners as still active after 60s today. Any idea what’s wrong in the current config? is IdleTimeout the time in second?
I am using the following configuration:
concurrent = 20
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "shared runners"
limit = 10
url = "https://gitlab.enki-multimedia.eu/"
token = "token"
executor = "docker+machine"
environment = ["OS_PROJECT_NAME=infrastructure", "OS_IDENTITY_API_VERSION=3", "OS_USER_DOMAIN_NAME=Default"]
[runners.cache]
Type = "s3"
Path = "/runners/cache"
Shared = true
[runners.cache.s3]
ServerAddress = "https://s3.gra.cloud.ovh.net"
AccessKey = "accesskey"
SecretKey = "secretkey"
BucketName = "gitlab-runners-cache"
[runners.docker]
tls_verify = false
image = "alpine:latest"
privileged = true
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.machine]
IdleCount = 2
IdleTime = 1800
MaxBuilds = 1
MachineDriver = "openstack"
MachineName = "shared-runner-%s"
MachineOptions = [
"openstack-auth-url=https://auth.cloud.ovh.net/v3",
"openstack-domain-name=Default",
"openstack-username=username",
"openstack-password=password",
"openstack-tenant-id=mytenant",
"openstack-flavor-name=s1-4",
"openstack-image-name=Debian 10",
"openstack-net-name=Ext-Net",
"openstack-ssh-user=debian",
"openstack-region=GRA1"
]
[[runners.machine.autoscaling]]
Periods = ["* * 9-17 * * mon-fri *"]
IdleCount = 2
IdleTime = 3600
Timezone = "UTC"
[[runners.machine.autoscaling]]
Periods = ["* * * * * sat,sun *"]
IdleCount = 2
IdleTime = 60
Timezone = "UTC"