Filippo Giunchedi has submitted this change and it was merged.

Change subject: graphite: switch labs instances cleanup to cron
......................................................................


graphite: switch labs instances cleanup to cron

tmpreaper will run on each puppet run, that's not really feasible
because it'd take a long time to scan through all files. Switch to cron
+ find instead to be ran once a day.

Bug: T143405
Change-Id: Ia8c51dd440dc2e7f5adfac8fac5959fdbc0fa477
---
M modules/role/manifests/graphite/production.pp
1 file changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/modules/role/manifests/graphite/production.pp 
b/modules/role/manifests/graphite/production.pp
index 05dc90f..efb3e4e 100644
--- a/modules/role/manifests/graphite/production.pp
+++ b/modules/role/manifests/graphite/production.pp
@@ -28,9 +28,11 @@
     }
 
     # Cleanup stale labs instances data - T143405
-    tmpreaper::reap { 'graphite-labs-instances':
-        path => "${storage_dir}/instances",
-        age  => '90d',
+    cron { 'graphite-labs-instances':
+        command => "[ -d ${storage_dir}/whisper/instances ] && find 
${storage_dir}/whisper/instances -type f -mtime +90 -delete && find 
${storage_dir}/whisper/instances -type d -empty -delete",
+        user    => '_graphite',
+        hour    => '8',
+        minute  => fqdn_rand(60),
     }
 
     $graphite_hosts = [

-- 
To view, visit https://gerrit.wikimedia.org/r/324820
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8c51dd440dc2e7f5adfac8fac5959fdbc0fa477
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Rush <r...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to