cb33660848e8576ff46334e7976fedd5fca972db
Commit Graph

6115 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
Jenkins
cb33660848 Merge "Cleanup tests for auditor invalidating hashes" 2016年09月22日 21:31:32 +00:00
Jenkins
af98608c14 Merge "Delete old tombstones" 2016年09月22日 21:29:10 +00:00
Jenkins
f1c3ceb48d Merge "Use separate headers for versioned_writes' stack and history modes" 2016年09月22日 20:05:02 +00:00
Alistair Coles
3da65be4b3 Cleanup tests for auditor invalidating hashes
Cleans up some auditor tests added in the Related-Change.
Make auditor NOT call invalidate_hash for a reclaimable
tombstone in a zero bytes file process, so that
invalidate_hash is only called once per reclaimable
tombstone per auditor cycle.
Previously each execution of 'swift-init object-auditor once'
would result in two identical entries being appended to
hashes.invalid for each reclaimable tombstone. With this change
that unnecessary duplication is removed.
Related-Change: I3e99dc702d55a7424c6482969e03cb4afac854a4
Change-Id: I5dfaa8d74c07ca8a494c29159c1a2bed39499613
2016年09月22日 17:04:07 +01:00
Clay Gerrard
bfaa8e0583 Fix ChunkWriteError when running unittests
I don't think this is a real bug - just that the mocked iter wasn't
closing it subiters like the real iter does.
Change-Id: I44c8159f9eea8737bc86b6c7eb59a512e57e86c1
2016年09月21日 17:33:30 -07:00
Tim Burke
60a2fe0ba8 Use separate headers for versioned_writes' stack and history modes
Now, instead of saying
 X-Versions-Location: <container>
 X-Versions-Mode: history
clients should just say
 X-History-Location: <container>
Since we've never had a release featuring a user-settable
X-Versions-Mode header, support may be dropped and that is now ignored.
Change-Id: Icfd0f481d4e40dd5375c737190aea7ee8dbc3bf9
2016年09月21日 16:42:27 -07:00
Mahati Chamarthy
81d4673674 Delete old tombstones
- Call invalidate_hash in auditor for reclaimable tombstones
- assert changed auditor behavior with a unit test
- driveby test: assert get_hashes behavior with a unit test
Co-Authored-By: Pete Zaitcev <zaitcev@redhat.com>
Co-Authored-By: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp>
Closes-Bug: #1301728
Change-Id: I3e99dc702d55a7424c6482969e03cb4afac854a4
2016年09月21日 14:09:53 -07:00
Jenkins
dd512a3207 Merge "Include object sysmeta in POST responses" 2016年09月21日 18:24:43 +00:00
Clay Gerrard
4f033a61b5 Fix unstable json.dumps ordering in obj-server test
test_GET_HEAD_with_fragment_preferences seemed to fail on ocassion on
my machine; the test seemed to be assuming the order of dictionary
keys in json output sent in headers; the fix was convert back to a
dictionary when making the assertion on the context of the json.
Change-Id: I1ea1b734c2a9fb12b8f59262bb1229421803e48e
Closes-Bug: #1625956 
2016年09月21日 00:28:39 -07:00
Jenkins
e07f9be8f5 Merge "api-ref: fix some header definitions" 2016年09月21日 06:44:27 +00:00
Jenkins
b4c1517ddd Merge "Fixed cut and pasted paragraph from commit message in manpage" 2016年09月20日 14:58:03 +00:00
Alistair Coles
cbfa79a159 api-ref: fix some header definitions
Clarify Content-Type header definition for listings.
Distinguish between request and response definitions for
X-Account-Meta-Temp-URL-Key* headers.
Insert X-Container-Meta-Quota-* headers missing from some
request/response definitions.
Improve X-Container-Meta-Access-Control-Expose-Headers
parameter formatting.
Distinguish between request and response definitions for
X-Container-Meta-Temp-URL-Key* headers.
Co-Authored-By: Christian Schwede <cschwede@redhat.com>
Change-Id: I8fc7610395973b520aa9ddd72c94e1eb75f602cd
Related-Change: I315b4e550b7d10880fbc00fce9311127ba609c2d
2016年09月20日 14:30:27 +01:00
Jenkins
937bc73a72 Merge "Clean up api-ref examples" 2016年09月20日 09:45:39 +00:00
Tim Burke
d40ff7098b Clean up api-ref examples
If we're going to talk about replacing an object, we should use the
same object name as the previous example.
Including a non-zero content-length on PUT but not providing a body
will timeout.
Not including the '-' in '-H' will make curl complain:
 Rebuilt URL to: H/
 * Could not resolve host: H
 * Closing connection 1
201 Created responses have content-length of zero, not 116.
Change-Id: Ifd878559ee4036e4893221c7968f53021f38e236
2016年09月19日 15:47:20 -07:00
Jenkins
539c3d417c Merge "api-ref: clean up account listing examples" 2016年09月19日 22:10:18 +00:00
Jenkins
96164086f7 Merge "Bring "egregious range request" comment in line with reality" 2016年09月19日 18:20:46 +00:00
Jenkins
718373f8ab Merge "DRY out probe.common" 2016年09月19日 17:00:25 +00:00
Jenkins
59066615cf Merge "remove comment saying we ignore H233. we actually check it" 2016年09月19日 16:59:36 +00:00
Jenkins
93b02c931f Merge "Turn on F812 check" 2016年09月19日 16:35:17 +00:00
Ondřej Nový
9a81b9537f Fixed cut and pasted paragraph from commit message in manpage
Change-Id: Iab839a917e407ce8119f0c6162751f11136cbf5b
2016年09月19日 15:31:46 +02:00
Alistair Coles
5ec9a62f4d api-ref: clean up account listing examples
Move the account listing sample responses to follow the sample
requests, and to precede the request/response parameter definitions to
be consistent with other parts of the doc.
Related-Change: I315b4e550b7d10880fbc00fce9311127ba609c2d
Change-Id: Ia20acacd238db4a423b8cd89af1658222b4c5828
2016年09月19日 09:46:06 +01:00
Alistair Coles
2355771d4b api-ref: Move repeated paragraph to an include file
Move repeated test re metadata header syntax to an include
file and make it be rendered as a note.
Also make already included text about metadata header value
encoding be a note.
Change-Id: I4795836587492954ad24dd5baaa5d668746d6040
2016年09月19日 09:18:19 +01:00
Jenkins
6fea41e0f6 Merge "Updating Bandit config file" 2016年09月19日 00:33:04 +00:00
Tim Burke
d0144962f6 Include object sysmeta in POST responses
This is *only* sysmeta, to ensure we neither change the semantics of the
response (which could happen if we included allowed_headers) nor reveal
previously-written metadata to write-only clients (which could happen if
we ever get updateable object metadata and sent back user meta).
We could conceivably send back transient sysmeta, though it seems
better to wait for a use-case that demands it.
Change-Id: I04fe0b36b85e546b5379bed12089ffd1bce01fcf
Co-Authored-By: Thiago da Silva <thiago@redhat.com>
2016年09月16日 17:51:56 -07:00
Jenkins
5126cc844a Merge "Enable object server to return non-durable data" 2016年09月16日 22:11:36 +00:00
Tim Burke
a741998bff Turn on F812 check
F812 list comprehension redefines <variable> from line ...
While the current violations were benign, this sort of code can easily
lead to subtle bugs. Seems worth checking, especially given how cheap it
is to bring existing code in line with it.
Change-Id: Ibdcf9f93b85a1f1411198001df6bdbfa8f92d114
2016年09月16日 14:44:37 -07:00
John Dickinson
70e3cf15bf remove comment saying we ignore H233. we actually check it
Change-Id: Ia78fbb32aa6f45aa6578734dc43f3262e717bab8
2016年09月16日 13:12:51 -07:00
Travis McPeak
b587d1606c Updating Bandit config file
This commit updates the Swift Bandit file to the new style
introduced in Bandit 1.0. In response to the struggle with
getting a Bandit config file working and kept up to date we
introduced a simplified version in Bandit 1.0.
This commit updates Swift's bandit.yaml to use the new version.
Change-Id: Ida5dd08f4ea72a377346f2159caeb2f3741d4980
2016年09月16日 09:20:34 -07:00
Alistair Coles
44a861787a Enable object server to return non-durable data
This patch improves EC GET response handling:
- The proxy no longer requires all object servers to have a
 durable file for the fragment archive that they return in
 response to a GET. The proxy will now be satisfied if just
 one object server has a durable file at the same timestamp
 as fragments from other object servers.
 This means that the proxy can now successfully GET an
 object that had missing durable files when it was PUT.
- The proxy will now ensure that it has a quorum of *unique*
 fragment indexes from object servers before considering a
 GET to be successful.
- The proxy is now able to fetch multiple fragment archives
 having different indexes from the same node. This enables
 the proxy to successfully GET an object that has some
 fragments that have landed on the same node, for example
 after a rebalance.
This new behavior is facilitated by an exchange of new
headers on a GET request and response between the proxy and
object servers.
An object server now includes with a GET (or HEAD) response:
- X-Backend-Fragments: the value of this describes all
 fragment archive indexes that the server has for the
 object by encoding a map of the form: timestamp -> <list
 of fragment indexes>
- X-Backend-Durable-Timestamp: the value of this is the
 internal form of the timestamp of the newest durable file
 that was found, if any.
- X-Backend-Data-Timestamp: the value of this is the
 internal form of the timestamp of the data file that was
 used to construct the diskfile.
A proxy server now includes with a GET request:
- X-Backend-Fragment-Preferences: the value of this
 describes the proxy's current preference with respect to
 those fragments that it would have object servers
 return. It encodes a list of timestamp, and for each
 timestamp a list of fragment indexes that the proxy does
 NOT require (because it already has them).
 The presence of a X-Backend-Fragment-Preferences header
 (even one with an empty list as its value) will cause the
 object server to search for the most appropriate fragment
 to return, disregarding the existence or not of any
 durable file. The object server assumes that the proxy
 knows best.
Closes-Bug: 1469094
Closes-Bug: 1484598
Change-Id: I2310981fd1c4622ff5d1a739cbcc59637ffe3fc3
Co-Authored-By: Paul Luse <paul.e.luse@intel.com>
Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
2016年09月16日 11:40:14 +01:00
Ha Van Tu
acb8971c76 Update link reference
This patch update the outdated link reference inside the doc.
Change-Id: I9c5aabe869226489f361ff637e9dec731bbc3d7d
2016年09月15日 14:33:32 +07:00
Jenkins
19b1c9ecb5 Merge "Corrections for the API specifications in api-ref" 2016年09月14日 23:43:09 +00:00
Jenkins
e7c2bad57f Merge "Make load_crypto_meta more py3-friendly" 2016年09月14日 22:06:41 +00:00
Jenkins
4b4ef8d15d Merge "Make container sync copy SLO manifests" 2016年09月14日 20:33:28 +00:00
Clay Gerrard
d062af836c DRY out probe.common
Specifically to facilitate the reuse of the retry check server
function to fill in the creds for the test2 account which is required
for probetests after the related change.
Change-Id: I9729faa4c8c8d6d65a481bc2ea3f0566d511034c
Related-Change: I8d503419b7996721a671ed6b2795224775a7d8c6
2016年09月14日 10:12:38 -07:00
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
Donagh McCabe
9ce596a5a6 Corrections for the API specifications in api-ref
Fixes a number of technical issues with the api-ref section
including:
- Added missing headers
- The header descriptions were made specific to whether they
 are used in requests or responses and the verb in question
 (example: Content-Length in object HEAD is the object size,
 not the response body length).
- Added references to API features such as bulk delete.
- Many typographical fixes (e.g., spaces in the middle
 of header names)
- Restored xml and json account/container listing
 examples.
The following areas were not updated and it is proposed
to defer them to a subsequent update. This is because
I don't have time or their merit is debatable:
- ACLs (as used in a Keystone context) are not
 described.
- Account create/delete is not described.
- I left List Endpoints as-is.
Change-Id: I315b4e550b7d10880fbc00fce9311127ba609c2d
2016年09月14日 10:10:20 +01:00
Clay Gerrard
2aa5811c7f fix string formatting in manager
Change-Id: I0d5c351735bdb6249dd9ec3e0c8b7ebe709feea6
2016年09月13日 15:15:13 -07:00
Jenkins
f414c154e0 Merge "Add test_pop in the test_header_key_dict" 2016年09月13日 08:10:22 +00:00
Jenkins
8608bd96dd Merge "Make object creation more atomic in Linux" 2016年09月13日 04:02:47 +00:00
Jenkins
a87b290137 Merge "More Test[Account|Container]Controller test updates" 2016年09月13日 01:48:59 +00:00
Tim Burke
f35829c291 Bring "egregious range request" comment in line with reality
With MAX_RANGES pulled out as a constant, developers are likely to
just trust the comment rather than go verify the value.
Change-Id: I47fbd4790492b272d53ee07fe5bc87170ce2c72b
Releated-Change: I4dcedcaae6c3deada06a0223479e611094d57234
2016年09月12日 15:02:43 -07:00
Jenkins
7a166cccfb Merge "Include correct version in install-guide" 2016年09月12日 19:28:45 +00:00
Jenkins
4365f91834 Merge "delete TODO in test_manager" 2016年09月12日 17:14:13 +00:00
Jenkins
d5e484e692 Merge "Add troubleshooting tips to keystoneauth docs" 2016年09月12日 03:15:47 +00:00
zheng yin
3f2a4b2d89 Add test_pop in the test_header_key_dict
There is a pop() function in the header_key_dict, but it has no
test_pop in the test_header_key_dict. Therefore, I add it.
Change-Id: I97bf9729fae3f044bcc69014549137f45ecbe91b
2016年09月11日 10:33:52 +08:00
Jenkins
d3a8123805 Merge "py3: Port test_splice to Python 3" 2016年09月09日 14:02:55 +00:00
zheng yin
f285cafaa7 delete TODO in test_manager
After test_shutdown,every method has its test case. Therefore, it is
not necessary to add more tests, then I remove TODO.
Change-Id: I23c1344bb18a83b154f890be0baa12799db045f8
2016年09月09日 16:41:22 +08:00
Nandini Tata
51925e5e34 Add man page for swift.conf
Added man page for swift.conf
Change-Id: I88235ed414dfc34cb46f2fea014f1e721962885a
Closes-Bug: 1607027
2016年09月08日 14:54:25 -07:00
Jenkins
7b9e2d27ea Merge "Allow DLO manifest to be updated when using post-as-copy" 2016年09月08日 15:09:27 +00:00
Jenkins
1e0539c6ed Merge "simple log information" 2016年09月08日 10:25:46 +00:00