BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/324941
Change subject: misc: get rid of hash support and maintenance ...................................................................... misc: get rid of hash support and maintenance We don't need/want anything but "random" anymore as the fixed type. While the maintenance flag was sometimes useful, it hasn't been used much (and arguably isn't critical and/or can be handled other ways), and this removes a bit of complexity here before further refactoring, after which we could consider re-adding this layer of complexity. Change-Id: Iac9a317bea31345aed6c8ef9bb6c4e0fe2a2b9f2 --- M modules/role/manifests/cache/misc.pp M modules/varnish/templates/misc-backend.inc.vcl.erb 2 files changed, 1 insertion(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/41/324941/1 diff --git a/modules/role/manifests/cache/misc.pp b/modules/role/manifests/cache/misc.pp index 6b1e15b..a7b9229 100644 --- a/modules/role/manifests/cache/misc.pp +++ b/modules/role/manifests/cache/misc.pp @@ -41,13 +41,6 @@ # 'req_host_re' => request hostname regex # ...and for sanity's sake, there should be no overlap among them # - # Maintenance flag: - # It is also possible to force a director to return a HTTP 503 - # response to each request. This allows a better user experience - # during downtimes caused by maintenance (e.g. OS reimage). - # To use it, set the following flag in the target director: - # 'maintenance' => 'Error message to display to the user.' - # $app_directors = { 'analytics1027' => { # Hue (Hadoop GUI) 'dynamic' => 'no', diff --git a/modules/varnish/templates/misc-backend.inc.vcl.erb b/modules/varnish/templates/misc-backend.inc.vcl.erb index 06d168f..5263186 100644 --- a/modules/varnish/templates/misc-backend.inc.vcl.erb +++ b/modules/varnish/templates/misc-backend.inc.vcl.erb @@ -12,15 +12,7 @@ else hostcmp = %Q[req.http.Host ~ "#{dir['req_host_re']}"] end - if dir.key?('maintenance') - action = %Q[return (synth(503, "#{dir['maintenance']}"));] - else - if dir['type'] == 'hash' - action = "set req.backend_hint = #{dirname}.backend(req.http.X-Client-IP);\n" - else - action = "set req.backend_hint = #{dirname}.backend();\n" - end - end + action = "set req.backend_hint = #{dirname}.backend();\n" if_stmts.push("if (#{hostcmp}) {\n #{action} }") end all_ifs = if_stmts.join(' els') -- To view, visit https://gerrit.wikimedia.org/r/324941 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac9a317bea31345aed6c8ef9bb6c4e0fe2a2b9f2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack <bbl...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits