Monthly cron job to clean up old koji trees for EPEL8/EPEL8-next #10726
Labels
No labels
announcement
authentication
automate
aws
backlog
blocked
bodhi
ci
Closed As
Duplicate
Closed As
Fixed
Closed As
Fixed with Explanation
Closed As
Initiative Worthy
Closed As
Insufficient data
Closed As
Invalid
Closed As
Spam
Closed As
Upstream
Closed As/Will Not
Can Not fix
cloud
communishift
copr
database
deprecated
dev
discourse
dns
downloads
easyfix
epel
factory2
firmitas
gitlab
greenwave
hardware
help wanted
high-gain
high-trouble
iad2
koji
koschei
lists
low-gain
low-trouble
mbs
medium-gain
medium-trouble
mini-initiative
mirrorlists
monitoring
Needs investigation
notifier
odcs
OpenShift
ops
OSBS
outage
packager_workflow_blocker
pagure
permissions
Priority
Needs Review
Priority
Next Meeting
Priority
🔥 URGENT 🔥
Priority
Waiting on Assignee
Priority
Waiting on External
Priority
Waiting on Reporter
rabbitmq
rdu-cc
release-monitoring
releng
repoSpanner
request-for-resources
s390x
security
SMTP
src.fp.o
staging
taiga
unfreeze
waiverdb
websites-general
wiki
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Infrastructure/fedora-infrastructure#10726
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently every day the rhel8-split.sh and cent8-split.sh creates a new hardlinked tree of files in
/mnt/fedora/app/fi-repo/rhel/rhel8/koji/
and/mnt/fedora/app/fi-repo/centos/stream8-kojitarget
. This adds up over time in hardlink counts on various files and makes looking at those directories ugly.What is needed is a once a month cron job that removes all the directories from the month before. This will allow a smaller directory listing and also faster ls/find on certain trees. This cron job would be in ansible tree
roles/grobisplitter/files
and would be run on batcave01.Metadata Update from @zlopez:
Something like
find /mnt/fedora/app/fi-repo/rhel/rhel8/koji/ /mnt/fedora/app/fi-repo/centos/stream8-kojitarget -mindepth 1 -maxdepth 1 -type d -mtime +30 -print -exec rm -rf '{}' \;
should work. It will find all the daily subdirectories that are 31 days or older and delete them. It can be run on a monthly cron job or even at the end of the*-split.sh
scripts each day. I suppose I could submit a PR, but it would be nice if someone with actual access could make sure it works as expected.Thanks for the tip @gotmax23 , tried your suggestion and it seems to work just fine.
I added a line in both cron files executing the command.
Here is the PR: https://pagure.io/fedora-infra/ansible/pull-request/1109
I merged the pr and pushed it out. Thanks everyone!
Metadata Update from @kevin: