diff options
author | Pascal Terjan <pterjan@gmail.com> | 2016-10-14 15:01:55 +0100 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2016-10-14 15:06:46 +0100 |
commit | 86918b8da22d88c183e00dfd86c2fdf25ca8142d (patch) | |
tree | 5ee829e989dfb36ee6bb5e5ce34cb9ddfd3a375b /modules/buildsystem | |
parent | fb1056a928d3adcd0665bfa591134fd64ff81d6b (diff) | |
download | puppet-86918b8da22d88c183e00dfd86c2fdf25ca8142d.tar puppet-86918b8da22d88c183e00dfd86c2fdf25ca8142d.tar.gz puppet-86918b8da22d88c183e00dfd86c2fdf25ca8142d.tar.bz2 puppet-86918b8da22d88c183e00dfd86c2fdf25ca8142d.tar.xz puppet-86918b8da22d88c183e00dfd86c2fdf25ca8142d.zip |
Avoid rebuilding some old packages
When a package gets built for mandatory arches but fails on non mandatory
arches, src.rpm stays around (that should be fixed).
When we cleanup old log files after 2 weeks, we often have the src.rpm
staying around longer (it seems it's ctime gets changed) than the file
saying it had already been built for mandatory architectures, so it gets
built again then rejected.
By removing rpms earlier than the logs, we avoid that problem.
Diffstat (limited to 'modules/buildsystem')
-rw-r--r-- | modules/buildsystem/manifests/scheduler.pp | 9 | ||||
-rw-r--r-- | modules/buildsystem/manifests/var/scheduler.pp | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/modules/buildsystem/manifests/scheduler.pp b/modules/buildsystem/manifests/scheduler.pp index 000bf0e7..141de6ce 100644 --- a/modules/buildsystem/manifests/scheduler.pp +++ b/modules/buildsystem/manifests/scheduler.pp @@ -29,6 +29,15 @@ class buildsystem::scheduler { type => 'ctime', recurse => true, age => $buildsystem::var::scheduler::clean_uploads_logs_age, + rmdirs => true, + } + } + if ($buildsystem::var::scheduler::clean_uploads_packages_age != '0') { + tidy { "${buildsystem::var::scheduler::homedir}/uploads": + type => 'ctime', + recurse => true, + age => $buildsystem::var::scheduler::clean_uploads_packages_age, + matches => [ '*.rpm' ], } } } diff --git a/modules/buildsystem/manifests/var/scheduler.pp b/modules/buildsystem/manifests/var/scheduler.pp index 4212021f..fa9c3cfc 100644 --- a/modules/buildsystem/manifests/var/scheduler.pp +++ b/modules/buildsystem/manifests/var/scheduler.pp @@ -21,6 +21,7 @@ class buildsystem::var::scheduler( $build_nodes_aliases = {}, $build_src_node, $clean_uploads_logs_age = '2w' + $clean_uploads_packages_age = '1w' ){ $login = 'schedbot' $homedir = "/var/lib/${login}" |