Prevent workers from filling up due to autopkgtest not cleaning up properly
4 unresolved threads
4 unresolved threads
Since the migration of the arm64 workers to bullseye, the workers are quickly filling up all disk space because autopkgtest regularly leaves lxc containers and stuff in /tmp around. Stop debci-worker and clean up if disk space is running low. This may help on s390x too, so make it generic.
Merge request reports
Activity
@terceiro I deployed this already on the connected arm64 workers, but I'd like your opinion nevertheless.
- cookbooks/debci/files/prevent-disk-filling 0 → 100644
1 #!/bin/sh 2 3 # Meant to called by a very regular cron job 4 5 percentages=$(df --output=pcent) 6 7 for per in $percentages ; do 8 if [ ${per} != "Use%" ] ; then 9 if [ ${per%%%} -gt 95 ] ; then 10 systemctl stop debci-worker 11 sleep 10 12 for lxc in $(lxc-ls --filter ci-) ; do - cookbooks/debci/files/prevent-disk-filling 0 → 100644
1 #!/bin/sh 2 3 # Meant to called by a very regular cron job 4 5 percentages=$(df --output=pcent) 6 7 for per in $percentages ; do - cookbooks/debci/files/prevent-disk-filling 0 → 100644
1 #!/bin/sh 2 3 # Meant to called by a very regular cron job 4 5 percentages=$(df --output=pcent) 6 7 for per in $percentages ; do 8 if [ ${per} != "Use%" ] ; then 9 if [ ${per%%%} -gt 95 ] ; then 10 systemctl stop debci-worker 11 sleep 10 12 for lxc in $(lxc-ls --filter ci-) ; do 13 lxc-destroy -f $lxc 14 done 15 rm -rf /tmp/autopkgtest-lxc.* added 2 commits
Please register or sign in to reply