Jcrespo has submitted this change and it was merged.

Change subject: Phab: properly disable crons for maintenance
......................................................................


Phab: properly disable crons for maintenance

Follows up Iab5e0fb5. Commenting a cron doesn't remove it from the
system. These should not be running at the moment but they still are

Bug: T138460
Change-Id: Ide926d45b246a2f2c44d0db69ec3f0b928d4c41c
---
M modules/phabricator/manifests/logmail.pp
M modules/role/manifests/phabricator/main.pp
2 files changed, 21 insertions(+), 16 deletions(-)

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



diff --git a/modules/phabricator/manifests/logmail.pp 
b/modules/phabricator/manifests/logmail.pp
index 0f6ad4d..1dc9640 100644
--- a/modules/phabricator/manifests/logmail.pp
+++ b/modules/phabricator/manifests/logmail.pp
@@ -32,6 +32,8 @@
 # [*weekday*]
 #    day of the week script is executed
 #
+# [*ensure*]
+#    Whether to enable the cron or not, default present
 
 define phabricator::logmail (
     $script_name,
@@ -42,6 +44,7 @@
     $minute      = '0',
     $monthday    = undef,
     $weekday     = undef,
+    $ensure      = present,
 ) {
 
 
@@ -54,7 +57,7 @@
     }
 
     cron { "phabstatscron_${title}":
-        ensure   => present,
+        ensure   => $ensure,
         command  => "${basedir}/${script_name}",
         user     => 'root',
         hour     => $hour,
diff --git a/modules/role/manifests/phabricator/main.pp 
b/modules/role/manifests/phabricator/main.pp
index 4792f89..67ea6e1 100644
--- a/modules/role/manifests/phabricator/main.pp
+++ b/modules/role/manifests/phabricator/main.pp
@@ -178,22 +178,24 @@
 
     # community metrics mail (T81784, T1003)
     # disabled due to maintenance: T138460
-    #phabricator::logmail {'communitymetrics':
-    #    script_name  => 'community_metrics.sh',
-    #    rcpt_address => '[email protected]',
-    #    sndr_address => '[email protected]',
-    #    monthday     => '1',
-    #    require      => Package[$deploy_target],
-    #}
+    phabricator::logmail {'communitymetrics':
+        ensure       => absent,
+        script_name  => 'community_metrics.sh',
+        rcpt_address => '[email protected]',
+        sndr_address => '[email protected]',
+        monthday     => '1',
+        require      => Package[$deploy_target],
+    }
 
     # project changes mail (T85183)
     # disabled due to maintenance: T138460
-    #phabricator::logmail {'projectchanges':
-    #    script_name  => 'project_changes.sh',
-    #    rcpt_address => [ '[email protected]' ],
-    #    sndr_address => '[email protected]',
-    #    monthday     => '*',
-    #    weekday      => 1, # Monday
-    #    require      => Package[$deploy_target],
-    #}
+    phabricator::logmail {'projectchanges':
+        ensure       => absent,
+        script_name  => 'project_changes.sh',
+        rcpt_address => [ '[email protected]' ],
+        sndr_address => '[email protected]',
+        monthday     => '*',
+        weekday      => 1, # Monday
+        require      => Package[$deploy_target],
+    }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide926d45b246a2f2c44d0db69ec3f0b928d4c41c
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: 20after4 <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Jcrespo <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to