From c9488027cb6db6aa3116fbcb9a9a8f9d294d52dc Mon Sep 17 00:00:00 2001 From: Christian Schwede Date: Thu, 1 Sep 2016 11:42:09 +0000 Subject: [PATCH] Make versioned_writes docstring more precise Add a note to the docstring that it is required to add a config section to the proxy-server.conf and an entry to the pipeline to support history mode. Closes-Bug: 1619261 Change-Id: I888485ab4ece6f47db081a4d58c1aab24ce72a8a --- doc/source/api/object_versioning.rst | 2 +- swift/common/middleware/versioned_writes.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/source/api/object_versioning.rst b/doc/source/api/object_versioning.rst index 23b8f9406a..3b86d4ed69 100644 --- a/doc/source/api/object_versioning.rst +++ b/doc/source/api/object_versioning.rst @@ -170,7 +170,7 @@ Example Using ``stack`` Mode versions of it, you must **DELETE** it five times. Example Using ``history`` Mode ----------------------------- +------------------------------ #. Create the ``current`` container: diff --git a/swift/common/middleware/versioned_writes.py b/swift/common/middleware/versioned_writes.py index c8c48b761d..ecde0899c1 100644 --- a/swift/common/middleware/versioned_writes.py +++ b/swift/common/middleware/versioned_writes.py @@ -81,15 +81,22 @@ so this functionality was already available in previous releases and every attempt was made to maintain backwards compatibility. To allow operators to perform a seamless upgrade, it is not required to add the middleware to the proxy pipeline and the flag ``allow_versions`` in the container server -configuration files are still valid. In future releases, ``allow_versions`` -will be deprecated in favor of adding this middleware to the pipeline to enable -or disable the feature. +configuration files are still valid, but only for ``stack`` mode. In future +releases, ``allow_versions`` will be deprecated in favor of adding this +middleware to the pipeline to enable or disable the feature. In case the middleware is added to the proxy pipeline, you must also set ``allow_versioned_writes`` to ``True`` in the middleware options to enable the information about this middleware to be returned in a /info request. + .. note:: + You need to add the middleware to the proxy pipeline and set + ``allow_versioned_writes = True`` to use the ``history`` mode. Setting + ``allow_versions = True`` in the container server is not sufficient to + enable ``history`` mode. + + Upgrade considerations: +++++++++++++++++++++++