Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/305600

Change subject: phabricator: only run dumps on active server
......................................................................

phabricator: only run dumps on active server

Also disable dumps cron and rsync on the inactive phabricator
server until further notice, to avoid cronspam.

Change-Id: Id13adf92cab1934664a9e134e12d6b134ca52fdc
---
M modules/role/manifests/phabricator/main.pp
1 file changed, 14 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/305600/1

diff --git a/modules/role/manifests/phabricator/main.pp 
b/modules/role/manifests/phabricator/main.pp
index 0cfa45c..3f429b7 100644
--- a/modules/role/manifests/phabricator/main.pp
+++ b/modules/role/manifests/phabricator/main.pp
@@ -26,6 +26,18 @@
     $phab_root_dir = '/srv/phab'
     $deploy_target = 'phabricator/deployment'
 
+    # logmail and dumps are only enabled on the active server set in Hiera
+    $phabricator_active_server = hiera('phabricator_active_server')
+    if $::hostname == $phabricator_active_server {
+        $logmail_ensure = 'present'
+        $dump_rsync_ensure = 'present'
+        $dump_enabled = 'true'
+    } else {
+        $logmail_ensure = 'absent'
+        $dump_rsync_ensure ='absent'
+        $dump_enabled = 'false'
+    }
+
     # lint:ignore:arrow_alignment
     class { '::phabricator':
         deploy_target    => $deploy_target,
@@ -90,12 +102,12 @@
         phabtools_cert  => $role::phabricator::config::phabtools_cert,
         phabtools_user  => $role::phabricator::config::phabtools_user,
         gerritbot_token => $role::phabricator::config::gerritbot_token,
-        dump            => true,
+        dump            => $dump_enabled,
         require         => Package[$deploy_target]
     }
 
     cron { 'phab_dump':
-        ensure  => present,
+        ensure  => $phab_dump_ensure,
         command => 'rsync -zpt --bwlimit=40000 -4 
/srv/dumps/phabricator_public.dump dataset1001.wikimedia.org::other_misc/ 
>/dev/null 2>&1',
         user    => 'root',
         minute  => '10',
@@ -186,15 +198,6 @@
 
     # community metrics mail (T81784, T1003)
     # disabled due to maintenance: T138460, re-enabled T139950
-
-    # crons are only enabled on the active server set in Hiera
-    $phabricator_active_server = hiera('phabricator_active_server')
-    if $::hostname == $phabricator_active_server {
-        $phab_logmail_ensure = 'present'
-    } else {
-        $phab_logmail_ensure = 'absent'
-    }
-
     phabricator::logmail {'communitymetrics':
         ensure       => $phab_logmail_ensure,
         script_name  => 'community_metrics.sh',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id13adf92cab1934664a9e134e12d6b134ca52fdc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to