"Check and remove all unused containers (both dangling and unreferenced) including volumes" on install
Summary
installing new gitlab-runner (over apt) version 13.9.0 forces some cleanup steps which can take long and shall not be part of the installation
docker volume ls | wc -l
4014
removing all this volumes takes some time resulting in a prolonged installation experience.
Setting up gitlab-runner (13.9.0) ...
GitLab Runner: detected user gitlab-runner
Runtime platform arch=amd64 os=linux pid=26895 revision=2ebc4dc4 version=13.9.0
gitlab-runner: Service is not running.
Runtime platform arch=amd64 os=linux pid=26912 revision=2ebc4dc4 version=13.9.0
gitlab-ci-multi-runner: Service is not running.
Runtime platform arch=amd64 os=linux pid=26972 revision=2ebc4dc4 version=13.9.0
Runtime platform arch=amd64 os=linux pid=27046 revision=2ebc4dc4 version=13.9.0
Check and remove all unused containers (both dangling and unreferenced) including volumes.
------------------------------------------------------------------------------------------
Progress: [ 74%] [############################################################################################################################............................................]
Steps to reproduce
have a lot of docker volumes and install the the gitlab-runner version 13.9.0
Actual behavior
cleanup of docker volumes when installing gitlab-runner, takes ages
Expected behavior
Install/upgrade gitlab-runner newest version and let the cleanup tasks to the admins.
Relevant logs and/or screenshots
n.a.
Environment description
using own runners, custom installation, executor is docker
docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
Server:
Containers: 42
Running: 0
Paused: 0
Stopped: 42
Images: 1360
Server Version: 20.10.5
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-136-lowlatency
Operating System: Ubuntu 18.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 24
Total Memory: 110.1GiB
Name: foobar
ID: foobar
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
Used GitLab Runner version
gitlab-runner --version
Version: 13.9.0
Git revision: 2ebc4dc4
Git branch: 13-9-stable
GO version: go1.13.8
Built: 2021-02-22T20:17:08+0000
OS/Arch: linux/amd64
Possible fixes
disable cleanup when install gitlab-runner