ArielGlenn has submitted this change and it was merged.

Change subject: PHP fatal destination is now a class parameter
......................................................................


PHP fatal destination is now a class parameter

wmerrors.ini had an hardcoded destination to a production server which
is not really nice for beta.  This patch makes the wmerrors.ini a
template accepting the 'fatal_log_file' variable, it is set as a default
parameter in applicationserver::config::php.  That will later on let us
set a different destination from the role classes.

Change-Id: I47ea00f92da9da38a4602f34d2649b39adab63ac
---
M modules/applicationserver/manifests/config/php.pp
R modules/applicationserver/templates/php/wmerrors.ini.erb
2 files changed, 11 insertions(+), 6 deletions(-)

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



diff --git a/modules/applicationserver/manifests/config/php.pp 
b/modules/applicationserver/manifests/config/php.pp
index bb66895..991e917 100644
--- a/modules/applicationserver/manifests/config/php.pp
+++ b/modules/applicationserver/manifests/config/php.pp
@@ -1,7 +1,12 @@
 # Configuration files for php5 running on application servers
 #
+# **fatal_log_file**
+# Where to send PHP fatal traces.
+#
 # requires applicationserver::packages to be in place
-class applicationserver::config::php {
+class applicationserver::config::php(
+       $fatal_log_file='udp://10.64.0.21:8420'
+) {
 
        Class["applicationserver::packages"] -> 
Class["applicationserver::config::php"]
 
@@ -27,10 +32,10 @@
                        mode => 0444,
                        source => 
"puppet:///modules/applicationserver/php/apc.ini";
                "/etc/php5/conf.d/wmerrors.ini":
-                       owner => root,
-                       group => root,
-                       mode => 0444,
-                       source => 
"puppet:///modules/applicationserver/php/wmerrors.ini";
+                       owner   => root,
+                       group   => root,
+                       mode    => 0444,
+                       content => 
template("applicationserver/php/wmerrors.ini.erb");
                "/etc/php5/conf.d/igbinary.ini":
                        owner => root,
                        group => root,
diff --git a/modules/applicationserver/files/php/wmerrors.ini 
b/modules/applicationserver/templates/php/wmerrors.ini.erb
similarity index 81%
rename from modules/applicationserver/files/php/wmerrors.ini
rename to modules/applicationserver/templates/php/wmerrors.ini.erb
index 3993c15..8ac78ac 100644
--- a/modules/applicationserver/files/php/wmerrors.ini
+++ b/modules/applicationserver/templates/php/wmerrors.ini.erb
@@ -3,6 +3,6 @@
 wmerrors.enabled=On
 
 wmerrors.message_file=/usr/local/apache/common-local/php-fatal-error.html
-wmerrors.log_file=udp://10.64.0.21:8420
+wmerrors.log_file=<%= fatal_log_file %>
 wmerrors.log_backtrace=On
 wmerrors.log_line_prefix="fatal "

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

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

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

Reply via email to