Mark Bergsma has uploaded a new change for review.
https://gerrit.wikimedia.org/r/71346
Change subject: Add a custom error page to the upload cache cluster
......................................................................
Add a custom error page to the upload cache cluster
Change-Id: Ibce78bb02ecb79c8f8bd96e8cfcbe0aa6af9b53b
---
M templates/varnish/upload-backend.inc.vcl.erb
M templates/varnish/upload-frontend.inc.vcl.erb
2 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/46/71346/1
diff --git a/templates/varnish/upload-backend.inc.vcl.erb
b/templates/varnish/upload-backend.inc.vcl.erb
index 31d8722..bfca3b6 100644
--- a/templates/varnish/upload-backend.inc.vcl.erb
+++ b/templates/varnish/upload-backend.inc.vcl.erb
@@ -1,5 +1,7 @@
# Varnish VCL include file for upload backends
+include "errorpage.inc.vcl";
+
sub pick_main_stevedore {
if (std.random(0, 2) < 1) {
set beresp.storage = "main1";
@@ -146,6 +148,11 @@
}
}
+sub vcl_error {
+ call errorpage;
+ return(deliver);
+}
+
sub vcl_deliver {
if (resp.http.X-Content-Range) {
set resp.http.Content-Range = resp.http.X-Content-Range;
diff --git a/templates/varnish/upload-frontend.inc.vcl.erb
b/templates/varnish/upload-frontend.inc.vcl.erb
index 8bc6d24..139676b 100644
--- a/templates/varnish/upload-frontend.inc.vcl.erb
+++ b/templates/varnish/upload-frontend.inc.vcl.erb
@@ -64,6 +64,11 @@
}
}
+sub vcl_error {
+ call errorpage;
+ return(deliver);
+}
+
sub vcl_deliver {
if (resp.http.X-Content-Range) {
set resp.http.Content-Range = resp.http.X-Content-Range;
--
To view, visit https://gerrit.wikimedia.org/r/71346
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibce78bb02ecb79c8f8bd96e8cfcbe0aa6af9b53b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits