Ottomata has submitted this change and it was merged.

Change subject: Delete udp2log generated edit logs on on stat1002 that are 
older than 90 days
......................................................................


Delete udp2log generated edit logs on on stat1002 that are older than 90 days

Note that udp2log is no longer generating edit logs, so in about 3 months
there will be no log files in /a/squid/archive/edits.

Bug: T92339
Change-Id: I5d316820cd8c875842ee54c211de6ea95ed91210
---
M modules/statistics/manifests/rsync/webrequest.pp
M modules/statistics/manifests/rsync_job.pp
2 files changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Ottomata: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/statistics/manifests/rsync/webrequest.pp 
b/modules/statistics/manifests/rsync/webrequest.pp
index 90be536..21ce39f 100644
--- a/modules/statistics/manifests/rsync/webrequest.pp
+++ b/modules/statistics/manifests/rsync/webrequest.pp
@@ -68,9 +68,10 @@
 
     # edit logs from oxygen
     statistics::rsync_job { 'edits':
-        source      => 
'oxygen.wikimedia.org::udp2log/webrequest/archive/edits*.gz',
-        destination => "${working_path}/squid/archive/edits",
-        ensure      => 'absent',
+        source         => 
'oxygen.wikimedia.org::udp2log/webrequest/archive/edits*.gz',
+        destination    => "${working_path}/squid/archive/edits",
+        retention_days => 90,
+        ensure         => 'absent',
     }
 
     # mobile logs from oxygen
diff --git a/modules/statistics/manifests/rsync_job.pp 
b/modules/statistics/manifests/rsync_job.pp
index 98a422e..2ce59e5 100644
--- a/modules/statistics/manifests/rsync_job.pp
+++ b/modules/statistics/manifests/rsync_job.pp
@@ -9,7 +9,8 @@
 #    source         - rsync source argument (including hostname)
 #    destination    - rsync destination argument
 #    retention_days - If set, a cron will be installed to remove files older 
than this many days from $destination.
-#    ensure
+#    ensure         - Either 'absent' or 'present'.  If absent, the rsync cron 
job will not exist, but if
+#                     $retention_days is given, the cron to prune old logs 
will still exist.  Default: 'present'
 #
 define statistics::rsync_job($source, $destination, $retention_days = undef, 
$ensure = 'present') {
     Class['::statistics'] -> Statistics::Rsync_job[$name]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d316820cd8c875842ee54c211de6ea95ed91210
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <o...@wikimedia.org>
Gerrit-Reviewer: Ottomata <o...@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