From de7ab0a8004a3e8a3c2912d04cb31a100d6d1a9e Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Wed, 30 Nov 2016 11:09:37 +0000 Subject: [PATCH] Allow X-History-Location versioned_writes Versioned Objects in Swift now use a middleware that is added to the pipeline instead of the "allow_versions" in the container config. These have 2 different Headers, so to prevent "X-Versions-Location" from not working the "allow_versions" in the container config is left in place. This patch adds the middleware by default and sets the Versioned Objects support to be on. This is the upstream default and the deployer would still need to set the "X-History-Location" header on a container to utilise the feature. Change-Id: I88811fd77fad8d2241448ca5ffb565fa7d704a00 --- defaults/main.yml | 1 + ...wift-versioned-writes-middleware-0b529e3cf2fb493d.yaml | 8 ++++++++ templates/proxy-server.conf.j2 | 4 ++++ 3 files changed, 13 insertions(+) create mode 100644 releasenotes/notes/swift-versioned-writes-middleware-0b529e3cf2fb493d.yaml diff --git a/defaults/main.yml b/defaults/main.yml index fad8c811..36603d9c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -76,6 +76,7 @@ swift_middleware_list: - account-quotas - slo - dlo + - versioned_writes - proxy-logging - proxy-server diff --git a/releasenotes/notes/swift-versioned-writes-middleware-0b529e3cf2fb493d.yaml b/releasenotes/notes/swift-versioned-writes-middleware-0b529e3cf2fb493d.yaml new file mode 100644 index 00000000..d8a98738 --- /dev/null +++ b/releasenotes/notes/swift-versioned-writes-middleware-0b529e3cf2fb493d.yaml @@ -0,0 +1,8 @@ +--- +features: + - Swift ``versioned_writes`` middleware is added to the + pipeline by default. Additionally the + ``allow_versioned_writes`` settings in the middleware + configuration is set to ``True``. This follows the + Swift defaults, and enables the use of the + ``X-History-Location`` metadata Header. diff --git a/templates/proxy-server.conf.j2 b/templates/proxy-server.conf.j2 index 9834730b..eea49c11 100644 --- a/templates/proxy-server.conf.j2 +++ b/templates/proxy-server.conf.j2 @@ -172,6 +172,10 @@ use = egg:swift#slo [filter:dlo] use = egg:swift#dlo +[filter:versioned_writes] +use = egg:swift#versioned_writes +allow_versioned_writes = True + [filter:account-quotas] use = egg:swift#account_quotas