Skip to content
Snippets Groups Projects

Prevent workers from filling up due to autopkgtest not cleaning up properly

Merged Paul Gevers requested to merge prevent-arm64-from-filling into master
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

Approval is optional

Merged by Paul GeversPaul Gevers 3 years ago (Aug 27, 2021 11:29am UTC)

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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
  • 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
  • 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.*
    • is this something new? did you notice anything different in test logs that could show autopkgtest/lxc behaving differently?

    • Those files have always been there. It's just that normally they're cleaned up. Actually I haven't checked if these trees contain the log, but I would expect the crash to also prevent the log from writing the crash. But I'll have a look.

    • Please register or sign in to reply
  • Ack

  • Paul Gevers added 2 commits

    added 2 commits

    Compare with previous version

  • Paul Gevers added 2 commits

    added 2 commits

    • 2ea64538 - 1 commit from branch master
    • d6d7cca3 - Prevent workers from filling up due to autopkgtest not cleaning up properly

    Compare with previous version

  • merged

  • Please register or sign in to reply
    Loading