Skip to content
Snippets Groups Projects
Commit 9512d912 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

Merge branch 'remove-stale-repro-chroots' into 'master'

rebuilderd_worker: start removing stale chroots

See merge request !554
parents 0661ade0 d1cabdfa
No related branches found
No related tags found
1 merge request!554rebuilderd_worker: start removing stale chroots
Pipeline #17380 passed
#!/bin/bash -e
find /var/lib/repro -maxdepth 1 -name '*?_?*' -mtime +6 -exec rm -rf {} +
[Unit]
Description=Clean up stale repro chroots
ConditionPathExists=/var/lib/repro
[Service]
Type=oneshot
ExecStart=/usr/local/bin/clean-repro
Nice=19
IOSchedulingClass=best-effort
IOSchedulingPriority=7
[Unit]
Description=Daily repro cleanup
[Timer]
OnCalendar=daily
RandomizedDelaySec=12h
Persistent=true
[Install]
WantedBy=timers.target
---
- name: daemon reload
systemd:
daemon-reload: true
......@@ -13,3 +13,17 @@
- name: enable and start rebuilderd-worker@{{ item }}
systemd: name=rebuilderd-worker@{{ item }} enabled=yes state=started
with_items: '{{ rebuilderd_workers }}'
- name: install cleanup script
copy: src=clean-repro dest=/usr/local/bin/clean-repro owner=root group=root mode=0755
- name: install cleanup units
copy: src={{ item }} dest=/etc/systemd/system/{{ item }} owner=root group=root mode=0644
loop:
- clean-repro.timer
- clean-repro.service
notify:
- daemon reload
- name: start and enable cleanup timer
service: name=clean-repro.timer enabled=yes state=started
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment