Giuseppe Lavagetto has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/367876 )
Change subject: role::mediawiki::canary_appserver: move to the future parser
......................................................................
role::mediawiki::canary_appserver: move to the future parser
Bug: T171704
Change-Id: I7fabe0d2077c05b9eaa773f44e33ea8f8b3cf52b
---
M hieradata/role/common/mediawiki/canary_appserver.yaml
M modules/hhvm/manifests/admin.pp
M modules/hhvm/manifests/init.pp
M modules/hhvm/templates/initscripts/hhvm.systemd_override.erb
M modules/hhvm/templates/initscripts/hhvm.upstart.erb
5 files changed, 18 insertions(+), 12 deletions(-)
Approvals:
Giuseppe Lavagetto: Looks good to me, approved
jenkins-bot: Verified
diff --git a/hieradata/role/common/mediawiki/canary_appserver.yaml
b/hieradata/role/common/mediawiki/canary_appserver.yaml
index a33df65..313a90a 100644
--- a/hieradata/role/common/mediawiki/canary_appserver.yaml
+++ b/hieradata/role/common/mediawiki/canary_appserver.yaml
@@ -23,3 +23,6 @@
apache::logrotate::rotate: 12
nutcracker::verbosity: "4"
role::mediawiki::webserver::tls: true
+
+# Use the future parser here
+profile::base::environment: "future"
diff --git a/modules/hhvm/manifests/admin.pp b/modules/hhvm/manifests/admin.pp
index 0358c51..1f8d85d 100644
--- a/modules/hhvm/manifests/admin.pp
+++ b/modules/hhvm/manifests/admin.pp
@@ -10,12 +10,10 @@
#
class hhvm::admin(
$ensure = present,
- $port = 9002,
+ $port = 9002, # TODO/puppet4 declare as integer
) {
include ::network::constants
include ::apache::mod::proxy_fcgi
-
- if $port !~ /^\d+$/ { fail('port must be numeric') }
apache::conf { 'hhvm_admin_port':
ensure => $ensure,
diff --git a/modules/hhvm/manifests/init.pp b/modules/hhvm/manifests/init.pp
index 255a65f..89d3fec 100644
--- a/modules/hhvm/manifests/init.pp
+++ b/modules/hhvm/manifests/init.pp
@@ -167,7 +167,7 @@
admin_server => { port => 9001 },
server => {
port => 9000,
- type => 'fastcgi',
+ 'type' => 'fastcgi',
gzip_compression_level => 0,
stat_cache => true,
dns_cache => {
diff --git a/modules/hhvm/templates/initscripts/hhvm.systemd_override.erb
b/modules/hhvm/templates/initscripts/hhvm.systemd_override.erb
index 3293a96..72da101 100644
--- a/modules/hhvm/templates/initscripts/hhvm.systemd_override.erb
+++ b/modules/hhvm/templates/initscripts/hhvm.systemd_override.erb
@@ -3,8 +3,8 @@
Environment=CONFIG_FILE=/etc/hhvm/server.ini
Environment=ADDITIONAL_ARGS=
Environment=RUN_AS_USER=www-data
-<%- if !@malloc_arenas.nil? && @malloc_arenas != '' -%>
-Environment="MALLOC_CONF=narenas:<%= @malloc_arenas %>"
+<%- if !scope['hhvm::malloc_arenas'].nil? && scope['hhvm::malloc_arenas'] !=
'' -%>
+Environment="MALLOC_CONF=narenas:<%= scope['hhvm::malloc_arenas'] %>"
<%- end -%>
EnvironmentFile=
EnvironmentFile=/etc/default/hhvm
diff --git a/modules/hhvm/templates/initscripts/hhvm.upstart.erb
b/modules/hhvm/templates/initscripts/hhvm.upstart.erb
index 19396f7..8b1bb48 100644
--- a/modules/hhvm/templates/initscripts/hhvm.upstart.erb
+++ b/modules/hhvm/templates/initscripts/hhvm.upstart.erb
@@ -1,6 +1,11 @@
# hhvm - HipHop Virtual Machine
# Starts HHVM in server (FastCGI) mode.
# Configured via /etc/default/hhvm.
+<%-
+cache_dir = scope['hhvm::cache_dir']
+log_dir = scope['hhvm::log_dir']
+tmp_dir = scope['hhvm::tmp_dir']
+-%>
description "HipHop Virtual Machine for PHP"
start on (local-filesystems and net-device-up IFACE!=lo)
@@ -9,12 +14,12 @@
[ ! -r /etc/default/hhvm ] && { stop; exit 0; }
. /etc/default/hhvm
mkdir -p -m0755 "${HHVM_RUN_DIR:=/var/run/hhvm}"
- mkdir -p -m0750 "<%= @cache_dir %>"
- mkdir -p -m0775 "<%= @log_dir %>"
- mkdir -p -m0775 "<%= @tmp_dir %>"
+ mkdir -p -m0750 "<%= cache_dir %>"
+ mkdir -p -m0775 "<%= log_dir %>"
+ mkdir -p -m0775 "<%= tmp_dir %>"
chown -R "${HHVM_USER:=www-data}:${HHVM_GROUP:=www-data}"
"${HHVM_RUN_DIR:=/run/hhvm}"
- chown -R "${HHVM_USER:=www-data}:${HHVM_GROUP:=www-data}" "<%= @cache_dir
%>" "<%= @tmp_dir %>"
- chown "root:${HHVM_GROUP}" "<%= @log_dir %>"
+ chown -R "${HHVM_USER:=www-data}:${HHVM_GROUP:=www-data}" "<%= cache_dir %>"
"<%= tmp_dir %>"
+ chown "root:${HHVM_GROUP}" "<%= log_dir %>"
end script
# Decomment this to start HHVM with memory profiling capabilities enabled but
inactive.
@@ -45,7 +50,7 @@
rm -f /var/run/hhvm/hhvm.pid
# Check if HHVM wrote a stack trace before exiting.
- TRACE="<%= @log_dir %>/stacktrace.${PID}.log"
+ TRACE="<%= log_dir %>/stacktrace.${PID}.log"
[ -r "$TRACE" ] || exit 0
# If a stack trace exists and a handler is defined, invoke it.
--
To view, visit https://gerrit.wikimedia.org/r/367876
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7fabe0d2077c05b9eaa773f44e33ea8f8b3cf52b
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits