BBlack has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/351663 )
Change subject: cache_upload: git rid of upload_domain ...................................................................... cache_upload: git rid of upload_domain This uses the standard req_handling stuff to 404 requests to unknown domains, ridding us of a classparam. Needs a similar hieradata change in deployment-prep (using upload.beta hostname). This helps with prepping upload VCL and puppetization for maps inclusion as well. Change-Id: I2963112222a64b5349415813f347abea20547655 --- M hieradata/labs.yaml M hieradata/role/common/cache/upload.yaml M modules/role/manifests/cache/upload.pp M modules/varnish/templates/upload-common.inc.vcl.erb 4 files changed, 2 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/63/351663/1 diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml index 2eb6b5e..a776fd6 100644 --- a/hieradata/labs.yaml +++ b/hieradata/labs.yaml @@ -53,7 +53,6 @@ role::cache::base::zero_site: 'https://zero.wikimedia.beta.wmflabs.org' role::cache::base::purge_host_only_upload_re: '^upload\.beta\.wmflabs\.org$' role::cache::base::purge_host_not_upload_re: '^(?!upload\.beta\.wmflabs\.org)' -role::cache::upload::upload_domain: 'upload.beta.wmflabs.org' role::cache::text::static_host: 'deployment.wikimedia.beta.wmflabs.org' role::cache::text::shortener_domain: 'w-beta.wmflabs.org' role::cache::text::top_domain: 'beta.wmflabs.org' diff --git a/hieradata/role/common/cache/upload.yaml b/hieradata/role/common/cache/upload.yaml index 0226c3b..df966f3 100644 --- a/hieradata/role/common/cache/upload.yaml +++ b/hieradata/role/common/cache/upload.yaml @@ -31,7 +31,7 @@ # eqiad: 'ms-fe-thumbs.svc.eqiad.wmnet' codfw: 'ms-fe-thumbs.svc.codfw.wmnet' cache::req_handling: - default: + upload.wikimedia.org: director: 'swift' subpaths: '^/+[^/]+/[^/]+/thumb/': diff --git a/modules/role/manifests/cache/upload.pp b/modules/role/manifests/cache/upload.pp index 93fb60f..aa81a1e 100644 --- a/modules/role/manifests/cache/upload.pp +++ b/modules/role/manifests/cache/upload.pp @@ -1,7 +1,5 @@ # filtertags: labs-project-deployment-prep -class role::cache::upload( - $upload_domain = 'upload.wikimedia.org', -) { +class role::cache::upload() { include role::cache::base include role::cache::ssl::unified include ::standard @@ -35,7 +33,6 @@ $common_vcl_config = { 'purge_host_regex' => $::role::cache::base::purge_host_only_upload_re, - 'upload_domain' => $upload_domain, 'allowed_methods' => '^(GET|HEAD|OPTIONS|PURGE)$', 'req_handling' => hiera('cache::req_handling'), } diff --git a/modules/varnish/templates/upload-common.inc.vcl.erb b/modules/varnish/templates/upload-common.inc.vcl.erb index 2043693..d259996 100644 --- a/modules/varnish/templates/upload-common.inc.vcl.erb +++ b/modules/varnish/templates/upload-common.inc.vcl.erb @@ -2,10 +2,6 @@ sub upload_common_recv { unset req.http.X-Range; - if (req.http.host != "<%= @vcl_config.fetch('upload_domain') %>") { - return (synth(404, "Requested domainname does not exist on this server")); - } - if (req.http.Range) { set req.hash_ignore_busy = true; } -- To view, visit https://gerrit.wikimedia.org/r/351663 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2963112222a64b5349415813f347abea20547655 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
