From 491363edd6de77e96e136f53a8cc1856738aae7a Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 22 Aug 2013 12:14:49 -0700 Subject: [PATCH] Add a mirror repack cron to git servers Like the one on gerrit, but this one adds pack-refs (because the git server on centos seems to deal with that better). Change-Id: I1ed497a3690d2c030408010dbd56b6cd916b47fa --- modules/openstack_project/manifests/git.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/openstack_project/manifests/git.pp b/modules/openstack_project/manifests/git.pp index 465c7b218f..a8a33e2e72 100644 --- a/modules/openstack_project/manifests/git.pp +++ b/modules/openstack_project/manifests/git.pp @@ -99,6 +99,16 @@ class openstack_project::git ( mode => 'enforcing' } + cron { 'mirror_repack': + user => 'cgit', + weekday => '0', + hour => '4', + minute => '7', + command => 'find /var/lib/git/ -type d -name "*.git" -print -exec git --git-dir="{}" repack -afd \; -exec git --git-dir="{}" pack-refs --all \;', + environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin', + require => User['cgit'], + } + file { '/var/www/cgit/static/openstack.png': ensure => present, source => 'puppet:///modules/openstack_project/openstack.png',