From: Zack Cerza Date: Fri, 29 Apr 2016 19:21:18 +0000 (-0600) Subject: Prune mon data along with remote logs X-Git-Tag: 1.1.0~619^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5eba2458c79d1c82b7d76b19c3e1e8d8a5de32de;p=teuthology.git Prune mon data along with remote logs Signed-off-by: Zack Cerza --- diff --git a/teuthology/prune.py b/teuthology/prune.py index 95937e1f..b345ab0f 100644 --- a/teuthology/prune.py +++ b/teuthology/prune.py @@ -139,6 +139,10 @@ def maybe_remove_remotes(run_dir, days, dry_run=False): if days < 0: return contents = listdir(run_dir) + subdirs = dict( + remote='remote logs', + data='mon data', + ) if PRESERVE_FILE in contents: return for child in contents: @@ -148,7 +152,8 @@ def maybe_remove_remotes(run_dir, days, dry_run=False): if (should_preserve(item) or not os.path.isdir(item) or not is_old_enough(item, days)): continue - _maybe_remove_subdir(item, 'remote', days, 'remote logs', dry_run) + for (subdir, description) in subdirs.iteritems(): + _maybe_remove_subdir(item, subdir, days, description, dry_run) def _maybe_remove_subdir(job_dir, subdir, days, description, dry_run=False):