[MediaWiki-commits] [Gerrit] Zero: unified everything, no opera for 293-41 - change (operations/puppet)

2014-10-16 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Zero: unified everything, no opera for 293-41
..

Zero: unified everything, no opera for 293-41

* All traffic should now processed as unified
* Cache fragmentation begone!

Change-Id: I5a95fbda0cfb1c4cf1463538c1a65cc1a6211ee1
---
M templates/varnish/zero.inc.vcl.erb
1 file changed, 110 insertions(+), 124 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/37/167037/1

diff --git a/templates/varnish/zero.inc.vcl.erb 
b/templates/varnish/zero.inc.vcl.erb
index ae7a709..c3586d3 100644
--- a/templates/varnish/zero.inc.vcl.erb
+++ b/templates/varnish/zero.inc.vcl.erb
@@ -74,130 +74,11 @@
 // Short of having netmapper (or equivalent) return a set of match 
parameters, I can't see any
 //   good way to make the rest of this cleaner really.
 if (req.http.X-CS2) {
-if (req.http.X-CS2 == 413-02) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((en|si|simple|ta)\.)?zero\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 470-03) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((en|bn)\.)?(zero|m)\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 624-02) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ 
^((fr|ha|ln|yo|eo|ar|zh|en|es|de)\.)?m\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 605-01) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((fr|ru|ja|zh|it|de|en|es|ar)\.)?m\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 641-14) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ 
^((en|zh|ar|hi|fr|sw|rw|de|es|ko)\.)?m\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 420-01) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((ar|tl|en|bn|ur)\.)?(zero|m)\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 410-01) {
-if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) || 
req.http.X-Forwarded-By == Opera) {
-if (req.http.host ~ ^((en|ur)\.)?(zero|m)\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 510-11) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((id|en|zh|ar|hi|ms|jv|su)\.)?zero\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 646-02) {
-if (!req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == M) {
-set req.http.X-ZeroTLS = 1;
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(456-02|502-13)$) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == ZERO) {
-// ZERO only, direct HTTP only
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(614-04|630-86|639-07)$) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == M) {
-// M only, direct HTTP only
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(612-03|652-02)$) {
-if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) || 
req.http.X-Forwarded-By == Opera) {
-if (req.http.X-Subdomain == M) {
-// M only, direct HTTP or Opera
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(520-18)$) {
-if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) || 
req.http.X-Forwarded-By == Opera) {
-if (req.http.X-Subdomain == ZERO) {
-// ZERO only, direct HTTP or opera
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} 

[MediaWiki-commits] [Gerrit] Zero: unified everything, no opera for 293-41 - change (operations/puppet)

2014-10-16 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: Zero: unified everything, no opera for 293-41
..


Zero: unified everything, no opera for 293-41

* All traffic should now processed as unified
* Cache fragmentation begone!

Change-Id: I5a95fbda0cfb1c4cf1463538c1a65cc1a6211ee1
---
M templates/varnish/zero.inc.vcl.erb
1 file changed, 110 insertions(+), 124 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/templates/varnish/zero.inc.vcl.erb 
b/templates/varnish/zero.inc.vcl.erb
index ae7a709..c3586d3 100644
--- a/templates/varnish/zero.inc.vcl.erb
+++ b/templates/varnish/zero.inc.vcl.erb
@@ -74,130 +74,11 @@
 // Short of having netmapper (or equivalent) return a set of match 
parameters, I can't see any
 //   good way to make the rest of this cleaner really.
 if (req.http.X-CS2) {
-if (req.http.X-CS2 == 413-02) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((en|si|simple|ta)\.)?zero\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 470-03) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((en|bn)\.)?(zero|m)\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 624-02) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ 
^((fr|ha|ln|yo|eo|ar|zh|en|es|de)\.)?m\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 605-01) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((fr|ru|ja|zh|it|de|en|es|ar)\.)?m\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 641-14) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ 
^((en|zh|ar|hi|fr|sw|rw|de|es|ko)\.)?m\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 420-01) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((ar|tl|en|bn|ur)\.)?(zero|m)\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 410-01) {
-if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) || 
req.http.X-Forwarded-By == Opera) {
-if (req.http.host ~ ^((en|ur)\.)?(zero|m)\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 510-11) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((id|en|zh|ar|hi|ms|jv|su)\.)?zero\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 646-02) {
-if (!req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == M) {
-set req.http.X-ZeroTLS = 1;
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(456-02|502-13)$) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == ZERO) {
-// ZERO only, direct HTTP only
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(614-04|630-86|639-07)$) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == M) {
-// M only, direct HTTP only
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(612-03|652-02)$) {
-if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) || 
req.http.X-Forwarded-By == Opera) {
-if (req.http.X-Subdomain == M) {
-// M only, direct HTTP or Opera
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(520-18)$) {
-if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) || 
req.http.X-Forwarded-By == Opera) {
-if (req.http.X-Subdomain == ZERO) {
-// ZERO only, direct HTTP or opera
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 655-12) {
-if