Elukey has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/309016

Change subject: Add a Substitute Apache directive to fix broken links in the 
Yarn UI
......................................................................

Add a Substitute Apache directive to fix broken links in the Yarn UI

yarn.wikimedia.org is a proxy to the Yarn UI, managed by a Jetty
Webserver. The HTML returned contains links with hardcoded
hostnames like analytics1001.eqiad.wmnet causing broken links.
Adding also the missing proxy rules to make everything work.

Bug: T116192
Change-Id: Idb2ceaa8e900afb9b21ef220cfff89167c1268e1
---
M modules/statistics/manifests/sites/yarn.pp
M modules/statistics/templates/yarn.wikimedia.org.erb
2 files changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/16/309016/1

diff --git a/modules/statistics/manifests/sites/yarn.pp 
b/modules/statistics/manifests/sites/yarn.pp
index 77abd45..2ab514b 100644
--- a/modules/statistics/manifests/sites/yarn.pp
+++ b/modules/statistics/manifests/sites/yarn.pp
@@ -11,6 +11,7 @@
 
     include ::apache::mod::proxy_http
     include ::apache::mod::proxy
+    include ::apache::mod::substitute
     include ::apache::mod::auth_basic
     include ::apache::mod::authnz_ldap
     include ::passwords::ldap::production
diff --git a/modules/statistics/templates/yarn.wikimedia.org.erb 
b/modules/statistics/templates/yarn.wikimedia.org.erb
index 3f008c9..4fec9c6 100644
--- a/modules/statistics/templates/yarn.wikimedia.org.erb
+++ b/modules/statistics/templates/yarn.wikimedia.org.erb
@@ -27,6 +27,12 @@
         AuthLDAPURL "ldaps://ldap-labs.eqiad.wikimedia.org 
ldap-labs.codfw.wikimedia.org/ou=people,dc=wikimedia,dc=org?cn"
         Require ldap-group cn=wmf,ou=groups,dc=wikimedia,dc=org
         Require ldap-group cn=nda,ou=groups,dc=wikimedia,dc=org
+
+        # The Jetty Webserver (responsible for the Yarn UI) returns HTML with 
hardcoded
+        # links in the HTML hrefs, so we need a way to avoid broken links.
+        AddOutputFilterByType SUBSTITUTE text/html
+        Substitute 
"s|http://analytics1001.eqiad.wmnet:19888|http://yarn.wikimedia.org|q"
+        Substitute 
"s|http://analytics1001.eqiad.wmnet:8088|http://yarn.wikimedia.org|q"
     </Location>
 
     CustomLog /var/log/apache2/yarn.wikimedia.org-access.log wmf
@@ -36,4 +42,7 @@
 
     ProxyPass / http://analytics1001.eqiad.wmnet:8088/
     ProxyPassReverse / http://analytics1001.eqiad.wmnet:8088/
+
+    ProxyPass /jobhistory/ http://analytics1001.eqiad.wmnet:19888/jobhistory/
+    ProxyPassReverse /jobhistory/ 
http://analytics1001.eqiad.wmnet:19888/jobhistory/
 </VirtualHost>
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb2ceaa8e900afb9b21ef220cfff89167c1268e1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Elukey <ltosc...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to