From d6279ce42a416652352d2b7ed5d16606c6752e7c Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 12 Apr 2017 09:20:39 +1000 Subject: [PATCH] Limit depth on git cleanup nodepool is getting cron errors fatal: bad numeric config value 'no' for 'gc.auto' in /opt/dib_cache/source-repositories/deb_python_pygit2_... /test/data/testrepo.git/config: invalid unit as it is picking up [1]. What are the odds?! Limit the search to -depth 1 to avoid going any further than top-level directorires. [1] https://git.openstack.org/cgit/openstack/deb-python-pygit2/tree/test/data/testrepo.git/config Change-Id: I062805fe142610c7b3ab2eb422a230f7296cbca5 --- manifests/site.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/site.pp b/manifests/site.pp index 4547c85b89..44a1e588ca 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -900,7 +900,7 @@ node 'nodepool.openstack.org' { user => 'nodepool', hour => '20', minute => '0', - command => 'find /opt/dib_cache/source-repositories/ -type d -name "*.git" -exec git --git-dir="{}" gc \; >/dev/null', + command => 'find /opt/dib_cache/source-repositories/ -maxdepth 1 -type d -name "*.git" -exec git --git-dir="{}" gc \; >/dev/null', environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin', require => Class['::openstackci::nodepool'], }