swift/test/probe
Alistair Coles f679ed0cc8 Make container sync copy SLO manifests
Currently the container sync daemon fails to copy
an SLO manifest, and the error will stall progress
of the sync process on that container. There are
several reasons why the sync of an SLO manifest
may fail:

1. The GET of the manifest from the source
   container returns an X-Static-Large-Object header
   that is not allowed to be included with a PUT
   to the destination container.

2. The format of the manifest object that is read
   from the source is not in the syntax required
   for a SLO manifest PUT.

3. Assuming 2 were fixed, the PUT of the manifest
   includes an ETag header which will not match the
   md5 of the manifest generated by the receiving
   proxy's SLO middleware.

4. If the manifest is being synced to a different
   account and/or cluster, then the SLO segments may
   not have been synced and so the validation of the
   PUT manifest will fail.

This patch addresses all of these obstacles by
enabling the destination container-sync middleware to
cause the SLO middleware to be bypassed by setting a
swift.slo_override flag in the request environ. This
flag is only set for request that have been validated
as originating from a container sync peer.

This is justifed by noting that a SLO manifest PUT from
a container sync peer can be assumed to have valid syntax
because it was already been validated when written to
the source container.

Furthermore, we must allow SLO manifests to be synced
without requiring the semantic of their content to be
re-validated because we have no way to enforce or check
that segments have been synced prior to the manifest, nor
to check that the semantic of the manifest is still valid
at the source.

This does mean that GETs to synced SLO manifests may fail
if segments have not been synced. This is however
consistent with the expectation for synced DLO manifests
and indeed for the source SLO manifest if segments have
been deleted since it was written.

Co-Authored-By: Oshrit Feder <oshritf@il.ibm.com>
Change-Id: I8d503419b7996721a671ed6b2795224775a7d8c6
Closes-Bug: #1605597
2016-09-14 13:32:00 +01:00
..
__init__.py Add option to make probetests more brittle 2013-07-19 01:39:42 -07:00
brain.py Refactor tests and add tests 2016-06-15 16:36:25 +01:00
common.py Make container sync copy SLO manifests 2016-09-14 13:32:00 +01:00
test_account_failures.py pids in probe is no longer used 2016-06-01 23:53:35 -07:00
test_account_get_fake_responses_match.py py3: Replace urllib imports with six.moves.urllib 2015-10-08 15:24:13 +02:00
test_account_reaper.py Follow up delayed reap probe test 2016-08-18 14:08:56 +01:00
test_container_failures.py pids in probe is no longer used 2016-06-01 23:53:35 -07:00
test_container_merge_policy_index.py Refactor tests and add tests 2016-06-15 16:36:25 +01:00
test_container_sync.py Make container sync copy SLO manifests 2016-09-14 13:32:00 +01:00
test_empty_device_handoff.py Enable object body and metadata encryption 2016-06-30 23:31:15 -07:00
test_object_async_update.py Make container update override headers persistent 2016-06-22 14:48:39 +01:00
test_object_expirer.py Raise 412 response on expirer 2016-08-07 10:44:59 +03:00
test_object_failures.py Enable object body and metadata encryption 2016-06-30 23:31:15 -07:00
test_object_handoff.py Enable object body and metadata encryption 2016-06-30 23:31:15 -07:00
test_object_metadata_replication.py Remove unnecessary tearDown 2016-08-29 14:32:10 +08:00
test_reconstructor_durable.py Fix some minor typos 2015-08-14 16:49:41 -07:00
test_reconstructor_rebuild.py Replace it.next() with next(it) for py3 compat 2015-06-15 22:10:45 +05:30
test_reconstructor_revert.py Fix probe tests from commit cf48e75 2016-05-02 17:29:32 -07:00
test_replication_servers_working.py Erasure Code Reconstructor 2015-04-14 00:52:17 -07:00
test_wsgi_servers.py Python3 eventlet patched httplib _MAXHEADERS 2016-07-21 04:21:36 +00:00