apt-stresstest-charm should cleanup legacy chdist directories
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
APT Stress Test Charm |
Fix Released
|
Medium
|
Haw Loeung |
Bug Description
The chdist directory will sometimes contain legacy repositories. The charm/script should look ahead to see if it has enough disk space to do its work OR if that's too difficult, should provide some utility cron tasks to cleanup repositories that haven't changed in a while.
/home/apt-
./redacted-xenial 2020-10-19 23:31:01.8581672230 +0000
./redacted-xenial 2020-10-19 23:32:18.2271109110 +0000
./redacted-xenial 2020-10-19 23:32:31.6552768280 +0000
[...]
I noticed that the charm already does some cleanup for the /tmp directory, perhaps we just need to add another line to cleanup /home/apt-
# reactive/
28 APT_STRESSTEST_
29 #
30 # This file is managed by Juju. Attempt no changes here.
31 #
32
33 SHELL=/bin/sh
34 PATH=/usr/
35 * * * * * {user} [ $(pgrep -u {user} -c timeout) -lt 4 ] && timeout {stresstest_
36
37 # Clean up left over downloads from previous test. This is likely due to hitting the run timeout.
38 */10 * * * * {user} find /tmp -maxdepth 1 -type d -name 'apt-stresstest-*' -mmin +{cleanup_time} -exec rm -rf {{}} +
39 """ # NOQA: E501
Related branches
- Thomas Cuthbert (community): Approve
- Canonical IS Reviewers: Pending requested
-
Diff: 37 lines (+8/-0)2 files modifiedfiles/test_apt_mirrors.py (+5/-0)
reactive/apt_stresstest.py (+3/-0)
summary: |
- apt-stresstest-charm should cleanup after itself better + apt-stresstest-charm should cleanup legacy cdhist directories |
summary: |
- apt-stresstest-charm should cleanup legacy cdhist directories + apt-stresstest-charm should cleanup legacy chdist directories |
Changed in apt-stresstest-charm: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Haw Loeung (hloeung) |
Changed in apt-stresstest-charm: | |
status: | In Progress → Fix Committed |
Changed in apt-stresstest-charm: | |
status: | Fix Committed → Fix Released |