Add STOPSIGNAL to gitlab-runner docker images
What does this MR do?
Instructs docker to stop the gitlab-runner docker images using SIGQUIT instead of the default SIGTERM.
Why was this MR needed?
On a busy system with many runners using the gitlab-runner image, it can be difficult to upgrade the image without killing running builds.
With this change you can trigger an upgrade and know current builds will finish before the container quits and the upgrade happens.
For cases where the container must die within a timeout, parameters such as "terminationGracePeriodSeconds" in Kubernetes can be used.
Merge request reports
Activity
added Community contribution label
added 1st contribution label
@tmaczukin quick one for you to look at
assigned to @tmaczukin
@p.young Looks good. Two questions, since I've never used
STOPSIGNAL
before:- In which version of Docker this keyword and feature was introduced? I couldn't find this at the Docker documentation page.
- How the image with defined
STOPSIGNAL
will work on an older Docker Engine?
It will probably create no problems, but I'd like to know the details before approving and merging :)
added runner-distribution label
Hi @tmaczukin,
- It looks like it was introduced in Docker Engine 1.9.0 (2015-11-03)
- Good news is I tested Docker Engine 1.8.3 and it just sent a SIGTERM, ignoring the STOPSIGNAL
Hopefully there won't be any issues. Docker will send a KILL after 10 seconds by default if the runner is still processing anything.
@p.young Thanks for checking this. In that case I'm just merging this. Docker 1.9.0 is so old, that we don't need to bother about this :)
mentioned in commit 86941cd0
changed milestone to %12.1
mentioned in issue #3235 (closed)
mentioned in issue #2396 (closed)
mentioned in issue #36956