Ema has submitted this change and it was merged. Change subject: VCL: allow to load test versions of netmapper JSON files ......................................................................
VCL: allow to load test versions of netmapper JSON files Do not hardcode /var/netmapper in wikimedia-frontend.vcl.erb, use a template variable instead. Specify a different directory for the test version of wikimedia_text-frontend.vcl to allow loading test versions of carriers.json and proxies.json. Change-Id: Icca24978a200ec45638dd4ff03182b3f33f23540 --- M modules/varnish/manifests/instance.pp M modules/varnish/manifests/wikimedia_vcl.pp M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 3 files changed, 5 insertions(+), 2 deletions(-) Approvals: Ema: Verified; Looks good to me, approved diff --git a/modules/varnish/manifests/instance.pp b/modules/varnish/manifests/instance.pp index 4588343..e02cbf5 100644 --- a/modules/varnish/manifests/instance.pp +++ b/modules/varnish/manifests/instance.pp @@ -26,6 +26,8 @@ $websocket_support = hiera('cache::websocket_support', false) + $netmapper_dir = '/var/netmapper' + # $varnish_version4 is used to distinguish between v4 and v3 versions of # VCL code, as well as to pass the right parameters to varnishd. See # varnish.systemd.erb diff --git a/modules/varnish/manifests/wikimedia_vcl.pp b/modules/varnish/manifests/wikimedia_vcl.pp index 733c0be..a5af94d 100644 --- a/modules/varnish/manifests/wikimedia_vcl.pp +++ b/modules/varnish/manifests/wikimedia_vcl.pp @@ -2,6 +2,7 @@ if $varnish_testing { $varnish_include_path = '/usr/share/varnish/tests/' $dynamic_directors = false + $netmapper_dir = $varnish_include_path } file { $title: diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb index 738490e..a031f19 100644 --- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb @@ -221,8 +221,8 @@ call wm_common_directors_init; // again, netmapper only used in frontends, for recv_fe_ip_processing // args here are map-name (for .map()), data file, and seconds between mtime checks for reload - netmapper.init("proxies", "/var/netmapper/proxies.json", 89); - netmapper.init("carriers", "/var/netmapper/carriers.json", 89); + netmapper.init("proxies", "<%= @netmapper_dir %>/proxies.json", 89); + netmapper.init("carriers", "<%= @netmapper_dir %>/carriers.json", 89); /* Function vcl_init in <%= @vcl %>.inc.vcl will be appended here */ } -- To view, visit https://gerrit.wikimedia.org/r/318320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icca24978a200ec45638dd4ff03182b3f33f23540 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ema <e...@wikimedia.org> Gerrit-Reviewer: BBlack <bbl...@wikimedia.org> Gerrit-Reviewer: Ema <e...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits