Elukey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392788 )

Change subject: profile::mariadb::misc::el::replication: fix el cleaner cronjob
......................................................................

profile::mariadb::misc::el::replication: fix el cleaner cronjob

Bug: T156933
Change-Id: I5ee086190e48e1dfb75058ca4d3d7f480e1adb50
---
M modules/profile/files/mariadb/misc/eventlogging/eventlogging_sync_rsyslog.conf
M modules/profile/manifests/mariadb/misc/eventlogging/replication.pp
2 files changed, 17 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/392788/1

diff --git 
a/modules/profile/files/mariadb/misc/eventlogging/eventlogging_sync_rsyslog.conf
 
b/modules/profile/files/mariadb/misc/eventlogging/eventlogging_sync_rsyslog.conf
index bf8daca..8ef2eba 100644
--- 
a/modules/profile/files/mariadb/misc/eventlogging/eventlogging_sync_rsyslog.conf
+++ 
b/modules/profile/files/mariadb/misc/eventlogging/eventlogging_sync_rsyslog.conf
@@ -1,3 +1,3 @@
 # rsyslogd(8) configuration file for eventlogging_sync.
 # This file is managed by Puppet.
-:programname, startswith, "eventlogging_sync" /var/log/eventlogging_sync.log
+:programname, startswith, "eventlogging_sync" 
/var/log/eventlogging/eventlogging_sync.log
diff --git a/modules/profile/manifests/mariadb/misc/eventlogging/replication.pp 
b/modules/profile/manifests/mariadb/misc/eventlogging/replication.pp
index 2697e43..7d7ede5 100644
--- a/modules/profile/manifests/mariadb/misc/eventlogging/replication.pp
+++ b/modules/profile/manifests/mariadb/misc/eventlogging/replication.pp
@@ -57,6 +57,13 @@
         mode   => '0755',
     }
 
+    file { '/var/log/eventlogging':
+        ensure => 'directory',
+        owner  => 'root',
+        group  => 'eventlog',
+        mode   => '0775',
+    }
+
     file { '/etc/eventlogging/whitelist.tsv':
         ensure  => 'present',
         owner   => 'root',
@@ -76,7 +83,7 @@
 
     logrotate::rule { 'eventlogging':
         ensure        => present,
-        file_glob     => '/var/log/eventlogging_*.log',
+        file_glob     => '/var/log/eventlogging/eventlogging_*.log',
         frequency     => 'daily',
         copy_truncate => true,
         compress      => true,
@@ -123,15 +130,18 @@
         # without doing any action to the db. This is useful to avoid gaps in
         # records sanitized if the script fails and does not commit a new 
timestamp.
         $eventlogging_cleaner_command = '/usr/local/bin/eventlogging_cleaner 
--whitelist /etc/eventlogging/whitelist.tsv --older-than 90 --start-ts-file 
/var/run/eventlogging_cleaner --batch-size 10000 --sleep-between-batches 2'
-        $command = "/usr/bin/flock --verbose -n /var/lock/eventlogging_cleaner 
${eventlogging_cleaner_command} >> /var/log/eventlogging_cleaner.log"
+        $command = "/usr/bin/flock --verbose -n /var/lock/eventlogging_cleaner 
${eventlogging_cleaner_command} >> 
/var/log/eventlogging/eventlogging_cleaner.log"
         cron { 'eventlogging_cleaner daily sanitization':
-            ensure  => present,
-            command => $command,
-            user    => 'eventlogcleaner',
-            hour    => 1,
+            ensure      => present,
+            command     => $command,
+            user        => 'eventlogcleaner',
+            minute      => 0,
+            hour        => 11,
+            environment => 'MAILTO=analytics-ale...@wikimedia.org',
             require => [
                 File['/usr/local/bin/eventlogging_cleaner'],
                 File['/etc/eventlogging/whitelist.tsv'],
+                File['/var/log/eventlogging'],
                 User['eventlogcleaner'],
             ]
         }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ee086190e48e1dfb75058ca4d3d7f480e1adb50
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Elukey <ltosc...@wikimedia.org>

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

Reply via email to