Hello BBlack, jenkins-bot,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "VCL: stabilize backend storage patterns"
......................................................................

Revert "VCL: stabilize backend storage patterns"

This reverts commit 3e99f66d888a2596bc1cd729e91163a2a80df37b.

Change-Id: I38f22ef90e1146bf351d9377ef0e3240af1a681c
---
D hieradata/role/codfw/cache/text.yaml
D hieradata/role/codfw/cache/upload.yaml
D hieradata/role/eqiad/cache/text.yaml
D hieradata/role/eqiad/cache/upload.yaml
M modules/role/manifests/cache/instances.pp
D modules/varnish/files/tests/text/15-x-next-is-cache-miss2pass.vtc
M modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
8 files changed, 4 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/379181/1

diff --git a/hieradata/role/codfw/cache/text.yaml 
b/hieradata/role/codfw/cache/text.yaml
deleted file mode 100644
index 6a2fc86..0000000
--- a/hieradata/role/codfw/cache/text.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cache::backend_warming: false
diff --git a/hieradata/role/codfw/cache/upload.yaml 
b/hieradata/role/codfw/cache/upload.yaml
deleted file mode 100644
index 6a2fc86..0000000
--- a/hieradata/role/codfw/cache/upload.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cache::backend_warming: false
diff --git a/hieradata/role/eqiad/cache/text.yaml 
b/hieradata/role/eqiad/cache/text.yaml
deleted file mode 100644
index 6a2fc86..0000000
--- a/hieradata/role/eqiad/cache/text.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cache::backend_warming: false
diff --git a/hieradata/role/eqiad/cache/upload.yaml 
b/hieradata/role/eqiad/cache/upload.yaml
deleted file mode 100644
index 6a2fc86..0000000
--- a/hieradata/role/eqiad/cache/upload.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cache::backend_warming: false
diff --git a/modules/role/manifests/cache/instances.pp 
b/modules/role/manifests/cache/instances.pp
index f24e952..40a64ba 100644
--- a/modules/role/manifests/cache/instances.pp
+++ b/modules/role/manifests/cache/instances.pp
@@ -91,11 +91,6 @@
         vcl_config => $fe_vcl_config,
     }
 
-    # Set backend_warming to enable/disable miss2pass behavior
-    $be_warming_vcl_config = merge($be_vcl_config, {
-        'backend_warming' => hiera('cache::backend_warming', false),
-    })
-
     varnish::instance { "${cache_type}-backend":
         instance_name      => '',
         layer              => 'backend',
@@ -105,7 +100,7 @@
         admin_port         => 6083,
         runtime_parameters => concat($be_runtime_params, $nuke_lru_params, 
$exp_thread_params),
         storage            => "${be_storage} ${be_transient_storage}",
-        vcl_config         => $be_warming_vcl_config,
+        vcl_config         => $be_vcl_config,
         app_directors      => $app_directors,
         app_def_be_opts    => $app_def_be_opts,
         backend_caches     => $our_backend_caches,
diff --git a/modules/varnish/files/tests/text/15-x-next-is-cache-miss2pass.vtc 
b/modules/varnish/files/tests/text/15-x-next-is-cache-miss2pass.vtc
deleted file mode 100644
index 9f39c02..0000000
--- a/modules/varnish/files/tests/text/15-x-next-is-cache-miss2pass.vtc
+++ /dev/null
@@ -1,29 +0,0 @@
-varnishtest "x-next-is-cache miss2pass"
-
-server s1 {
-    rxreq
-    txresp
-
-    rxreq
-    txresp
-} -start
-
-varnish v1 -arg "-p cc_command='exec cc -fpic -shared -Wl,-x -L/usr/local/lib/ 
-o %o %s -lmaxminddb' -p vcc_allow_inline_c=true -p vcc_err_unref=false" 
-vcl+backend {
-    backend vtc_backend {
-        .host = "${s1_addr}"; .port = "${s1_port}";
-    }
-
-    include "/usr/share/varnish/tests/wikimedia_text-backend.vcl";
-} -start
-
-client c1 {
-    txreq -url /1
-    rxresp
-    expect resp.status == 200
-    expect resp.http.X-Cache-Int ~ "miss"
-
-    txreq -url /2 -hdr "X-Next-Is-Cache: 1"
-    rxresp
-    expect resp.status == 200
-    expect resp.http.X-Cache-Int ~ "pass"
-} -run
diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
index df5dfe4..5f63062 100644
--- a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
@@ -80,24 +80,8 @@
                return (synth(403, "Access denied"));
        }
 
-       // X-Next-Is-Cache is used to signal to other logic whether this
-       // request jumps next to another cache or the applayer.  We also
-       // convert such a signal sent by a previous backend cache to
-       // X-MISS2PASS, which converts misses to passes (we're only looking for
-       // opporunistic hits on these, but don't want to disturb the local
-       // backend cache's object hotness/distribution). The backend_warming
-       // setting is meant to be set temporarily from hieradata to disable
-       // this behavior (when we want to use the misses from an outer-layer
-       // backend to pre-warm some data in the next layer deep of backend).
-       if (req.restarts == 0) {
-               unset req.http.X-MISS2PASS;
-               if (req.http.X-Next-Is-Cache) {
-                       unset req.http.X-Next-Is-Cache;
-                       <%- if not @vcl_config.fetch("backend_warming", false) 
-%>
-                       set req.http.X-MISS2PASS = 1;
-                       <%- end -%>
-               }
-       }
+       // Used to signal to other logic whether this request jumps next to 
another cache or the applayer
+       unset req.http.X-Next-Is-Cache;
 
        call wm_common_recv_early;
 
@@ -149,10 +133,6 @@
 sub vcl_miss {
        call wm_common_miss;
        call cluster_be_miss;
-       if (req.http.X-MISS2PASS) {
-               unset req.http.X-MISS2PASS;
-               return (pass);
-       }
        return (fetch); // no default VCL (which is just "return (fetch)" 
anyways)
 }
 
diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index ef1727d..e4bdb72 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -229,9 +229,7 @@
        error 403 "This server has been disabled, you probably ended up here 
because of hardcoded IPs or broken DNS caching";
 <% end -%>
 
-       // no injection from outside our stack allowed for these
-       unset req.http.X-DCPath;
-       unset req.http.X-Next-Is-Cache;
+       unset req.http.X-DCPath; // no injection from outside our stack
        unset req.http.Proxy; // https://httpoxy.org/
 
        if (req.restarts == 0) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I38f22ef90e1146bf351d9377ef0e3240af1a681c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to