ArielGlenn has submitted this change and it was merged.

Change subject: vary wmerrors.ini 'fatal_log_file' per realm
......................................................................


vary wmerrors.ini 'fatal_log_file' per realm

Beta needs the PHP fatal errors to be send to a different UDP receiver
than the one used in production.  This creates a configuration role
class for application servers that let us vary the fatal_log_file.

Hence, instead of calling the configuration class from the module:
applicationserver::config::php, one should include that new role
role::applicationserver::configuration::php.

Change-Id: I212e353b79564e2f909770b0e659414c3988aedd
---
M manifests/role/applicationserver.pp
M manifests/role/lucene.pp
2 files changed, 26 insertions(+), 12 deletions(-)

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



diff --git a/manifests/role/applicationserver.pp 
b/manifests/role/applicationserver.pp
index 29235d2..27a572a 100644
--- a/manifests/role/applicationserver.pp
+++ b/manifests/role/applicationserver.pp
@@ -15,6 +15,20 @@
 @monitor_group { "videoscaler_eqiad": description => "eqiad video scaler" }
 
 class role::applicationserver {
+
+       class configuration::php {
+               # Passed to wmerrors extension
+               $fatal_log_file = $::realm ? {
+                       'production' => 'udp://10.64.0.21:8420',
+                       'labs'       => 'udp://10.4.0.58:8420',  # 
deployment-bastion
+               }
+
+               class { 'applicationserver::config::php':
+                       fatal_log_file => $fatal_log_file,
+               }
+
+       }
+
 # Class: role::applicationserver
 #
 # This class installs a mediawiki application server
@@ -79,7 +93,7 @@
                include ::applicationserver,
                        applicationserver::pybal_check,
                        applicationserver::syslog,
-                       applicationserver::config::php
+                       role::applicationserver::configuration::php
 
                class { "applicationserver::config::apache": maxclients => 
$maxclients }
 
@@ -181,11 +195,11 @@
                        extra_args => "-v 0"
                }
 
-               include applicationserver::config::php,
-                       applicationserver::config::base,
+               include applicationserver::config::base,
                        applicationserver::packages,
                        applicationserver::cron,
-                       applicationserver::sudo
+                       applicationserver::sudo,
+                       role::applicationserver::configuration::php
 
                # dependency for wikimedia-task-appserver
                service { 'apache':
@@ -200,11 +214,11 @@
                class { "role::applicationserver::common": group => "jobrunner" 
}
 
                class { "mediawiki::jobrunner": dprioprocs => 15, iprioprocs => 
6, procs_per_iobound_type => 5, run_jobs_enabled => $run_jobs_enabled }
-               include applicationserver::config::php,
-                       applicationserver::config::base,
+               include applicationserver::config::base,
                        applicationserver::packages,
                        applicationserver::cron,
-                       applicationserver::sudo
+                       applicationserver::sudo,
+                       role::applicationserver::configuration::php
 
                # dependency for wikimedia-task-appserver
                        service { 'apache':
@@ -220,11 +234,11 @@
        class maintenance {
                class { "role::applicationserver::common": group => "misc" }
 
-               include applicationserver::config::php,
-                       applicationserver::config::base,
+               include applicationserver::config::base,
                        applicationserver::packages,
                        applicationserver::cron,
-                       applicationserver::sudo
-
+                       applicationserver::sudo,
+                       role::applicationserver::configuration::php
        }
+
 }
diff --git a/manifests/role/lucene.pp b/manifests/role/lucene.pp
index d0a2d38..597458c 100644
--- a/manifests/role/lucene.pp
+++ b/manifests/role/lucene.pp
@@ -227,10 +227,10 @@
                # Include packages needed for MW maintenance scripts
                include standard,
                        mediawiki,
-                       applicationserver::config::php,
                        applicationserver::config::base,
                        applicationserver::packages,
                        applicationserver::sudo,
+                       role::applicationserver::configuration::php,
                        role::lucene::admins,
                        lucene::users
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I212e353b79564e2f909770b0e659414c3988aedd
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to