Ori.livneh has submitted this change and it was merged.
Change subject: Fix-ups for I09926c8c2
......................................................................
Fix-ups for I09926c8c2
* In xenon-generate-svgs: don't nullglob; set mindwidth to 0.5.
* Fix Apache URL rewrites; add mod_proxy_http on fluorine.
* Run xenon-log service as xenon rather than www-data.
* Pass redis config to redis client via '**'
Change-Id: I8170134759818d2583046c4edc89d3885c03eb25
---
M manifests/role/xenon.pp
M modules/xenon/files/xenon-generate-svgs
M modules/xenon/files/xenon-log
M modules/xenon/files/xenon-log.conf
M templates/apache/sites/performance.wikimedia.org.erb
M templates/apache/sites/xenon.erb
6 files changed, 14 insertions(+), 12 deletions(-)
Approvals:
Ori.livneh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/role/xenon.pp b/manifests/role/xenon.pp
index 97c9333..2c25392 100644
--- a/manifests/role/xenon.pp
+++ b/manifests/role/xenon.pp
@@ -4,6 +4,8 @@
# application servers, showing where time is spent.
#
class role::xenon {
+ include ::apache::mod::proxy
+ include ::apache::mod::proxy_http
include ::xenon
class { '::redis':
diff --git a/modules/xenon/files/xenon-generate-svgs
b/modules/xenon/files/xenon-generate-svgs
index d9c958b..d667522 100755
--- a/modules/xenon/files/xenon-generate-svgs
+++ b/modules/xenon/files/xenon-generate-svgs
@@ -1,9 +1,8 @@
#!/bin/bash
set +C # OK to clobber out-of-date SVGs
-for log in "/srv/xenon/logs/*/*.log"; do
+shopt -s globstar nullglob
+for log in /srv/xenon/**/*.log; do
svg="${log//log/svg}"
mkdir -m0755 -p "$(dirname $svg)"
- [ ! -f "$svg" -o "$svg" -ot "$log" ] && {
- /usr/local/bin/flamegraph.pl --minwidth=1 "$log" > "$svg"
- }
+ [ ! -f "$svg" -o "$svg" -ot "$log" ] && /usr/local/bin/flamegraph.pl
--minwidth=1 "$log" > "$svg"
done
diff --git a/modules/xenon/files/xenon-log b/modules/xenon/files/xenon-log
index 73cb3c3..20638ae 100755
--- a/modules/xenon/files/xenon-log
+++ b/modules/xenon/files/xenon-log
@@ -27,8 +27,7 @@
parser = argparse.ArgumentParser()
-parser.add_argument('config', nargs='?', default='/etc/xenon/config.yaml',
- type=argparse.FileType('r'))
+parser.add_argument('config', nargs='?', default='/etc/xenon-log.yaml')
args = parser.parse_args()
with args.config as f:
@@ -80,7 +79,7 @@
logs = [TimeLog(**log) for log in config['logs']]
-conn = redis.Redis(config['redis'])
+conn = redis.Redis(**config['redis'])
pubsub = conn.pubsub()
pubsub.subscribe('xenon')
diff --git a/modules/xenon/files/xenon-log.conf
b/modules/xenon/files/xenon-log.conf
index 1858e81..c9fb765 100644
--- a/modules/xenon/files/xenon-log.conf
+++ b/modules/xenon/files/xenon-log.conf
@@ -4,8 +4,8 @@
start on (local-filesystems and net-device-up IFACE!=lo)
-setuid www-data
-setgid www-data
+setuid xenon
+setgid xenon
respawn
respawn limit unlimited
diff --git a/templates/apache/sites/performance.wikimedia.org.erb
b/templates/apache/sites/performance.wikimedia.org.erb
index 00838f6..fe44d56 100644
--- a/templates/apache/sites/performance.wikimedia.org.erb
+++ b/templates/apache/sites/performance.wikimedia.org.erb
@@ -15,6 +15,6 @@
allow from all
</Directory>
- ProxyPass /xenon http://fluorine.eqiad.wmnet
- ProxyPassReverse /xenon http://fluorine.eqiad.wmnet
+ ProxyPass /xenon http://fluorine.eqiad.wmnet/xenon
+ ProxyPassReverse /xenon http://fluorine.eqiad.wmnet/xenon
</VirtualHost>
diff --git a/templates/apache/sites/xenon.erb b/templates/apache/sites/xenon.erb
index 9ea2909..2225bc2 100644
--- a/templates/apache/sites/xenon.erb
+++ b/templates/apache/sites/xenon.erb
@@ -1,7 +1,9 @@
# Apache configuration for xenon SVG hosting.
+
# This file is managed by Puppet.
<VirtualHost *:80>
- DocumentRoot /srv/xenon/svgs
+ DocumentRoot "/var/www"
+ Alias /xenon "/srv/xenon"
<Directory />
AllowOverride None
--
To view, visit https://gerrit.wikimedia.org/r/179960
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8170134759818d2583046c4edc89d3885c03eb25
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits