Remove offpeak settings docker autoscaling
What does this MR do?
Deprecate the OffPeak field from runner
Why was this MR needed?
This MR is needed to remove the support of the Offpeak configuration
from runner. The details of the chosen implementation to achieve it, can be seen here
What's the best way to test this MR?
Two different outcomes must be tested:
Absence of Offpeak fields when registering a new docker+machine runner
- Register a new
docker+machine
with the following command
gitlab-runner register \
--non-interactive \
--executor "docker+machine" \
--docker-image "alpine:3.11.7" \
--url "https://gitlab.com" \
--description "Docker Machine Runner" \
--registration-token "REGISTRATION_TOKEN_HERE"
The config.toml
generated should be free of any Offpeak
fields as below
Generated config.toml
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "Docker Machine Runner"
url = "https://gitlab.com"
token = "RUNNER_TOKEN_HERE"
executor = "docker+machine"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.docker]
tls_verify = false
image = "alpine:3.11.7"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.machine]
IdleCount = 0
MachineDriver = ""
MachineName = ""
Deprecation log for Offpeak configuration when sets
config.toml to use for this test
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "Local GitLab Runner for tests and debugging"
url = "https://gitlab.com"
token = "YOUR_TOKEN_HERE"
executor = "docker+machine"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.docker]
tls_verify = false
image = "alpine:3.11.7"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.machine]
IdleCount = 0
MachineDriver = "virtualbox"
MachineName = "offpeak-test-%s"
OffPeakPeriods = ["*", "*", "3-4", "*", "*", "*", "*"]
OffPeakTimezone = ""
OffPeakIdleCount = 2
OffPeakIdleTime = 2000
Once the runner launched, the following warning message will be logged :
WARNING: OffPeak docker machine configuration is deprecated and has been removed since 14.0. Please use convert the setting into a [[docker.machine.autoscaling]] configuration instead: https://docs.gitlab.com/runner/configuration/autoscale.html#off-peak-time-mode-configuration-deprecated
The Off Peak time mode configuration (Deprecated)
section of the configuration/autoscale.html
page has been updated to give indication on how to manually convert in [[runners.machine.autoscaling]]
What are the relevant issue numbers?
closes: #25555 (closed)