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

Change subject: [WIP] profile::redids::jobqueue: stagger redis slave restarts
......................................................................

[WIP] profile::redids::jobqueue: stagger redis slave restarts

Change-Id: I58f1fb4b16f5947eecd0f89b075471e335e45de6
---
M modules/profile/manifests/redis/jobqueue.pp
M modules/profile/manifests/redis/jobqueue_slave.pp
2 files changed, 6 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/98/391798/1

diff --git a/modules/profile/manifests/redis/jobqueue.pp 
b/modules/profile/manifests/redis/jobqueue.pp
index da37315..d2a00e2 100644
--- a/modules/profile/manifests/redis/jobqueue.pp
+++ b/modules/profile/manifests/redis/jobqueue.pp
@@ -1,23 +1,3 @@
-# Very simple profile for redis for the MW jobqueue. It works as an addition to
-# profile::redis::multidc
-# This is basically to cope with issues described in
-# https://phabricator.wikimedia.org/T163337 with a ugly workaround: restart
-# periodically the redis slaves in order to force a
-# service restart
 class profile::redis::jobqueue {
     require ::profile::redis::multidc
-    file { '/usr/local/bin/restart-redis-if-slave':
-        ensure => present,
-        source => 'puppet:///modules/profile/redis/restart-redis-if-slave.sh',
-        mode   => '0555',
-        owner  => 'root',
-        group  => 'root',
-    }
-
-    $instance_str = join($::profile::redis::multidc::instances, ' ')
-    cron { 'jobqueue-redis-conditional-restart':
-        command => "/usr/local/bin/restart-redis-if-slave ${instance_str}",
-        hour    => 1,
-        minute  => 0,
-    }
 }
diff --git a/modules/profile/manifests/redis/jobqueue_slave.pp 
b/modules/profile/manifests/redis/jobqueue_slave.pp
index 39b3f59..478e859 100644
--- a/modules/profile/manifests/redis/jobqueue_slave.pp
+++ b/modules/profile/manifests/redis/jobqueue_slave.pp
@@ -14,9 +14,14 @@
         group  => 'root',
     }
     $instance_str = join($::profile::redis::slave::instances, ' ')
+    if $::site == 'codfw' {
+        $restart_hour = 3
+    } else {
+        $restart_hour = 1
+    }
     cron { 'jobqueue-redis-conditional-restart':
         command => "/usr/local/bin/restart-redis-if-slave ${instance_str}",
-        hour    => 1,
+        hour    => $restart_hour,
         minute  => 0,
     }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58f1fb4b16f5947eecd0f89b075471e335e45de6
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