BBlack has uploaded a new change for review.
https://gerrit.wikimedia.org/r/230687
Change subject: rename varnish backends more-explicitly
......................................................................
rename varnish backends more-explicitly
The old way gave name transforms such as:
10.2.2.1 -> ipv4_10_2_2_1
rendering.svc.eqiad.wmnet -> rendering
The primary issue here is that "backends" and "directors" can both be used as
values for req.backend and share a namespace, so this commonly creates a
situation where director "rendering" contains backend "rendering", which fails
to compile
The new way gives an explicit "be_" prefix to non-director backends and uses
the full value, as in:
10.2.2.1 -> be_10_2_2_1
rendering.svc.eqiad.wmnet -> be_rendering_svc_eqiad_wmnet
Change-Id: Iee790dec0222aecc32dd33b08976b39a4fc21ff8
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/87/230687/1
diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 2b44bcd..ed2a0cc 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -95,7 +95,7 @@
# List of Puppet generated backends
<%
@varnish_backends.each do |backend|
- name = /^[0-9\.]+$/.match(backend) ? "ipv4_" + backend.gsub(".", "_") :
backend.split(".")[0].gsub("-", "_")
+ name = 'be_' + backend.gsub(/[.-]/,'_')
probe = backend_option(backend, "probe", nil)
-%>
backend <%= name %> {
@@ -140,7 +140,7 @@
<% end -%>
<%
backends.each do |backend|
- name = /^[0-9\.]+$/.match(backend) ? "ipv4_" +
backend.gsub(".", "_") : backend.split(".")[0].gsub("-", "_")
+ name = 'be_' + backend.gsub(/[.-]/,'_')
-%>
{
.backend = <%= name %>;
--
To view, visit https://gerrit.wikimedia.org/r/230687
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee790dec0222aecc32dd33b08976b39a4fc21ff8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits