From e03a7c35bdcf0017652e07312edf8ce3f728e102 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 7 Aug 2020 15:40:30 -0700 Subject: [PATCH] registry: try fixing osbs rule and try bypassing varnish I think the lack of ! on the osbs rule meant that nothing ever went to the cdn. This increases load on the real registry a lot. Also, we are using varnish here, but lets try and just go via haproxy. varnish might be having problems keeping all the 404s in memory/cache. The cdn thing should help that, but since we have cloudfront I don't think we also need to use varnish here. Signed-off-by: Kevin Fenzi --- .../templates/reversepassproxy.registry-generic.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf index 7103d296b0..d6aca6ea46 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf @@ -9,7 +9,7 @@ RewriteCond %{HTTP:VIA} !cdn77 RewriteCond %{HTTP:VIA} !cloudfront RewriteCond %{SERVER_NAME} !^registry-no-cdn\.fedoraproject.org$ RewriteCond %{REQUEST_METHOD} !^(PATCH|POST|PUT|DELETE|HEAD)$ -RewriteCond %{REMOTE_HOST} ^osbs-*$ +RewriteCond %{REMOTE_HOST} !^osbs-*$ RewriteRule ^/v2/(.*)/blobs/([a-zA-Z0-9:]*) https://cdn.registry.fedoraproject.org/v2/$1/blobs/$2 [R] {% endif %} @@ -20,7 +20,7 @@ RewriteRule ^/v2/(.*)$ http://oci-registry02:5000/v2/$1 [P,L] {% elif env == "staging" %} RewriteRule ^/v2/(.*)$ http://oci-registry01:5000/v2/$1 [P,L] {% endif %} -RewriteRule ^/v2/(.*)$ http://localhost:6081/v2/$1 [P,L] +RewriteRule ^/v2/(.*)$ http://localhost:10048/v2/$1 [P,L] RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1 RewriteCond "&%{QUERY_STRING}" &tag=testing