- 08 Apr, 2020 18 commits
-
-
Benjamin Tissoires authored
Some images are not part of the db, either the db is not up to date, either they were pulled manually. Ignore them. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
so that we do not remove objects that have been created/used less than a day ago. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
Now that the history is offloaded to the gitlab server, we can start we accurate data. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
This should remove the complex need to listen to events, not have history and whatnot. Right now it is very simple, it counts since the beginning of the available files in fdo-containers-usage. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
problem is that the stored docker events are not that many, and we mostly only get events from gitlab/gitlab-runner-helper Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
We want to listen to events, so clearing up our state at every run will make this moot. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
this makes easier to sort the list of last used images Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
otherwise: File "/usr/lib/python3/dist-packages/docker/errors.py", line 31, in create_api_error_from_http_exception raise cls(e, response=response, explanation=explanation) docker.errors.NotFound: 404 Client Error: Not Found ("No such container: 03c5217472db4bc979a167371262ce56e93dc2a9fd7e19791fa59ecf4cb0ef24") Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
We need to enforce working with UTC, otherwise we won't get accurate expired time stamps. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
Benjamin Tissoires authored
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
-
- 07 Apr, 2020 1 commit
-
-
Emma Anholt authored
As a reminder to myself in the future, this was generated with: kubectl get pods --namespace marge-bot -o yaml > marge-mesa-config.yaml
-
- 28 Mar, 2020 12 commits
-
-
allows to run the script just once or in a loop Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
- and guess if the image can be safely removed, - and if the image is part of an upstream project, and should likely not be cleaned Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
click is so much better than argparse Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
no functional changes, merely whitespaces and unused imports. docker-free-space.py:31:1: F401 'functools' imported but unused docker-free-space.py:34:1: F401 'sys' imported but unused docker-free-space.py:39:1: E302 expected 2 blank lines, found 1 docker-free-space.py:42:1: E302 expected 2 blank lines, found 1 docker-free-space.py:45:1: E305 expected 2 blank lines after class or function definition, found 1 docker-free-space.py:47:1: E302 expected 2 blank lines, found 1 docker-free-space.py:54:1: E302 expected 2 blank lines, found 1 docker-free-space.py:60:1: E302 expected 2 blank lines, found 1 docker-free-space.py:70:31: E201 whitespace after '{' docker-free-space.py:70:124: E202 whitespace before '}' docker-free-space.py:82:9: E265 block comment should start with '# ' docker-free-space.py:83:13: E265 block comment should start with '# ' docker-free-space.py:97:31: E201 whitespace after '{' docker-free-space.py:97:124: E202 whitespace before '}' docker-free-space.py:115:24: E201 whitespace after '{' docker-free-space.py:115:81: E202 whitespace before '}' docker-free-space.py:116:28: E201 whitespace after '{' docker-free-space.py:116:101: E202 whitespace before '}' docker-free-space.py:128:77: E226 missing whitespace around arithmetic operator docker-free-space.py:128:82: E226 missing whitespace around arithmetic operator docker-free-space.py:128:104: E226 missing whitespace around arithmetic operator docker-free-space.py:128:109: E226 missing whitespace around arithmetic operator docker-free-space.py:139:44: E261 at least two spaces before inline comment docker-free-space.py:139:44: E262 inline comment should start with '# ' docker-free-space.py:142:20: E261 at least two spaces before inline comment docker-free-space.py:142:21: E262 inline comment should start with '# ' docker-free-space.py:145:13: E265 block comment should start with '# ' docker-free-space.py:146:13: E265 block comment should start with '# ' Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
flake8 complains that lines are over indented. `%s/ / /g` Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
-
Daniel Stone authored
-
- 26 Mar, 2020 1 commit
-
-
not my best script ever, but it'll do the job
-
- 16 Mar, 2020 2 commits
-
-
Daniel Stone authored
-
Daniel Stone authored
-
- 13 Mar, 2020 1 commit
-
-
Daniel Stone authored
This script is a WIP attempt to create something smarter than docker-gc. Currently, docker-gc runs on a cron, and deletes every Docker volume it sees (not an issue for ccache as it is mounted into the host filesystem), every stopped container it sees, and every image older than 12-24h (depending on runner disk size and usage). This is too blunt a hammer, because it means we have to constantly keep downloading common images after they get deleted. It means that we have to manually clean up disks when jobs fail, because big jobs can fill up the disk - but we also still delete images when we don't need to because there's plenty of space. The script in this commit takes a smarter approach, by: - monitoring the free disk space every five minutes - if the free space falls below an acceptable threshold, pruning the least-recently-used images until the space comes back above the threshold, ignoring Mesa/GStreamer base images as they will very likely be immediately re-pulled - only as an emergency measure, deleting the Mesa/GStreamer base images if required, still on an LRU basis However, this script is also completely useless. Every gitlab-runner container starts the gitlab-runner-helper image, which pulls the Git repository, parses the CI YAML definitions, sets the container up to run in the defined context, then executes the actual work. The images defined in the CI job are pulled locally, but as they are not referred to by any containers, they are all equal on the LRU front with a usage time of zero. Examining the gitlab-runner code, I tried monitoring the containerd events to see when it started each job and get details of the image, however it was silent on this - and gRPC + containerd API are really painful to use. It would probably work to go forward with this script (or something like docuum), but taking the image-pull time as the LRU timestamp, and continuing to whitelist the base images. In order to get actual-LRU, we would have to get sideband information from gitlab-runner about which images it was using at which times, or from the GitLab daemon itself.
-
- 06 Mar, 2020 2 commits
-
-
Daniel Stone authored
-
Daniel Stone authored
-
- 25 Feb, 2020 3 commits
-
-
Daniel Stone authored
-
Daniel Stone authored
-
Daniel Stone authored
Add a systemd unit augmentation to wait for gitlab-runner to finish its currently-running jobs when we stop it. This will let us do upgrades and reboots without terminating and failing CI jobs.
-