Revert "Temporarily disable intermediate registry prune"
This reverts commit 95f0c32a61
.
We add a bit more code on top of the revert to capture output in a log
file (pruning is very verbose) and rotate 30 daily copies of the log
file.
Change-Id: I1778989d676d316537cf135b8e14a255434091b4
This commit is contained in:
parent
d1dcda1410
commit
e9e3129ffe
@ -75,11 +75,25 @@
|
||||
shell:
|
||||
cmd: docker image prune -f
|
||||
|
||||
# Temporarily disable to aid debug of mysteriously absent blobs
|
||||
# -corvus 2019-10-09
|
||||
# - name: Install cron to garbage collect the registry daily
|
||||
# cron:
|
||||
# name: "docker registry garbage-collect"
|
||||
# minute: "0"
|
||||
# hour: "0"
|
||||
# job: "/usr/bin/docker exec registrydocker_registry_1 zuul-registry prune"
|
||||
- name: Create registry prune log output directory
|
||||
file:
|
||||
path: /var/log/registry-prune
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
|
||||
- name: Install cron to garbage collect the registry daily
|
||||
cron:
|
||||
name: "docker registry garbage-collect"
|
||||
minute: "0"
|
||||
hour: "0"
|
||||
job: "/usr/bin/docker exec registrydocker_registry_1 zuul-registry prune >> /var/log/registry-prune/prune.log 2>&1"
|
||||
|
||||
- name: Install logrotate rules
|
||||
include_role:
|
||||
name: logrotate
|
||||
vars:
|
||||
logrotate_rotate: 30
|
||||
logrotate_file_name: '/var/log/registry-prune/prune.log'
|
||||
logrotate_frequency: 'daily'
|
||||
|
Loading…
Reference in New Issue
Block a user