From 9fe0f13f7933ed264d045cb118a2361d64c71532 Mon Sep 17 00:00:00 2001 From: Pete Zaitcev Date: Feb 02 2015 19:44:57 +0000 Subject: Add mandatory middleware to proxy pipeline See bz#1051113, bz#1181126. People keep getting confused about this. Although nowadays (after Havana) the code forces mandatory middleware anyway, it emits a warning message. Adding the middleware makes that message to go away. In addition, we re-arrange the proxy-server.conf order just a bit, to make it match the upstream for easy diffing. --- diff --git a/openstack-swift.spec b/openstack-swift.spec index 2548425..fbeb796 100644 --- a/openstack-swift.spec +++ b/openstack-swift.spec @@ -478,6 +478,7 @@ exit 0 %changelog * Wed Jan 28 2015 Pete Zaitcev 2.2.0-4 - Update parameters to authtoken in proxy-server.conf, upstream review 150832 +- Add mandatory middleware to pipeline of proxy (#1051113, #1181126) * Wed Jan 14 2015 Pete Zaitcev 2.2.0-3 - Intercept logging to local[012].* because Packstack uses LOCAL1 too (#997983) diff --git a/proxy-server.conf b/proxy-server.conf index 1fc9c82..190326b 100644 --- a/proxy-server.conf +++ b/proxy-server.conf @@ -4,13 +4,16 @@ workers = 8 user = swift [pipeline:main] -pipeline = healthcheck cache authtoken keystone proxy-logging proxy-server +pipeline = catch_errors gatekeeper healthcheck proxy-logging cache authtoken keystone slo dlo proxy-logging proxy-server [app:proxy-server] use = egg:swift#proxy allow_account_management = true account_autocreate = true +[filter:healthcheck] +use = egg:swift#healthcheck + [filter:cache] use = egg:swift#memcache memcache_servers = 127.0.0.1:11211 @@ -18,11 +21,25 @@ memcache_servers = 127.0.0.1:11211 [filter:catch_errors] use = egg:swift#catch_errors -[filter:healthcheck] -use = egg:swift#healthcheck - [filter:proxy-logging] use = egg:swift#proxy_logging +# +# Note: The double proxy-logging in the pipeline is not a mistake. The +# left-most proxy-logging is there to log requests that were handled in +# middleware and never made it through to the right-most middleware (and +# proxy server). Double logging is prevented for normal requests. See +# proxy-logging docs. + +# Note: Put after auth and staticweb in the pipeline. +[filter:slo] +use = egg:swift#slo + +# Note: Put after auth and staticweb in the pipeline. +[filter:dlo] +use = egg:swift#dlo + +[filter:gatekeeper] +use = egg:swift#gatekeeper [filter:keystone] use = egg:swift#keystoneauth