b587d1606c5bd524efc473182f6048580fae33c8
Commit Graph

6035 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
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
Jenkins
7ff1055ff3 Merge "Fix api reference of object GET request with Range parameter" 2016年09月02日 07:08:11 +00:00
Jenkins
26bb5bdf72 Merge "Remove unnecessary variable" 2016年09月02日 06:46:46 +00:00
Jenkins
0516a5e0b7 Merge "Remove meaningless lines in reconciler unit test" 2016年09月02日 06:42:04 +00:00
Kazuhiro MIYAHARA
84b264baa8 Fix api reference of object GET request with Range parameter
In RFC 7233, response body size of range requests with parameter
'bytes=N-M' is (M - N + 1). And response of object GET request with
range parameter in current Swift implementation is according to the
RFC. However, in current api reference explains that response body
size of object GET request with 'Range: bytes=10-15' is five
( != 15 - 10 + 1).
This patch fixes the api reference explanation.
Change-Id: I8371864f8e5adb42c1e56b7ea26c556ea1252728
2016年09月02日 11:01:55 +09:00
Jenkins
c2f5e30c86 Merge "Silence "Client disconnected" warnings on reads." 2016年09月01日 22:01:58 +00:00
Jenkins
6b07bcbf05 Merge "Tighten header checks for object PUT/POST paths" 2016年09月01日 20:55:48 +00:00
Jenkins
ef4df41423 Merge "Make versioned_writes docstring more precise" 2016年09月01日 19:55:13 +00:00
Jenkins
41246c9e6d Merge "Correct swift reraising of exception" 2016年09月01日 19:20:00 +00:00
Kazuhiro MIYAHARA
a4279112b3 Remove meaningless lines in reconciler unit test
There are two lines in which lists are sorted in test_reconciler.py
However, the values in the lists will be same, then the two lines are
meaningless.
This patch removes the two lines from test_reconciler.py
Change-Id: I7d72a7a4e9a27d87cd78c96f79d1b340b2ad23de
2016年09月01日 21:26:05 +09:00
Christian Schwede
c9488027cb 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
2016年09月01日 12:02:21 +00:00
Timur Alperovich
2825909d25 Silence "Client disconnected" warnings on reads.
When a client fully reads the content and closes the iterator, the
Client disconnected warning is still generated, as there is no logic
to check whether the GeneratorExit exception was raised after the
client received all of the data. This can be observed when doing
large object reads or using an InternalClient and reading exactly
Content-Length bytes from the returned app_iter body.
The patch amends the behavior to hoist how many bytes client read from
a given part and only raise an exception if there are more parts left
or a part was not fully read.
Lastly, the GeneratorExit exception is no longer swallowed and is
re-raised in the handling code.
Change-Id: I879149897fdb25aae977b7f17e580610b188ce04
2016年09月01日 04:33:50 +00:00
gengchc2
671254224a Correct swift reraising of exception
When an exception was caught and rethrown, it should call 'raise'
without any arguments because it shows the place where an exception
occured initially instead of place where the exception re-raised.
Change-Id: I783a2a65f3e38a23ba49b6ae5a2f56a5fdaac2fc
2016年09月01日 02:25:29 +00:00
Jenkins
ac81ccd948 Merge "Add test to validate the error strings in test_expirer" 2016年08月31日 14:28:18 +00:00
Jenkins
db5fd6470a Merge "Add unit case" 2016年08月31日 13:57:12 +00:00
Jenkins
dd30b9ef98 Merge "Close the iterators in string_along." 2016年08月31日 00:15:33 +00:00
Timur Alperovich
66c905e294 Close the iterators in string_along.
Make sure to close the underlying iterator in string_along. What is
currently happening when using the InternalClient is that "Client
disconnected" warnings are generated and resources are tied up until
GC runs.
Change-Id: If1f6c0c756aee95f53f99371439533a97d347eab
2016年08月30日 14:28:08 -07:00
zheng yin
cd8eb6db91 Add test to validate the error strings in test_expirer
Improve test_get_process_values_* methods in obj/test_expirer in the
form assertRaises(ValueError, x.get_process_values,{}/vals), to use
the assertRaises context form. This improves understandability by
validateing the error strings in addition to the ValueError.
Related-Change: I3d12b79470d122b2114f9ee486b15d381f290f95
Change-Id: I1c66b8894cba8328d19cf99491a8ad18ded71078
2016年08月30日 16:16:32 +00:00
Jenkins
decac953f5 Merge "Authorise versioned write PUTs before copy" 2016年08月30日 10:52:36 +00:00
Jenkins
a811fe0205 Merge "add test for expirer processes == process" 2016年08月30日 10:16:38 +00:00
gecong1973
3b5850836c Remove white space between print and ()
There is a white space between print and ()
in /tempauth.py, This patch fix it
Change-Id: Id3493bdef12223aa3a2bffc200db8710f5949101
2016年08月30日 15:08:49 +08:00
Jenkins
95322d9830 Merge "Use more specific asserts in test/unit/cli tests" 2016年08月30日 00:44:02 +00:00
Jenkins
2b705e8c34 Merge "Clarify test case in common/ring/test_builder" 2016年08月29日 21:02:30 +00:00
zheng yin
f88e7fc0da Clarify test case in common/ring/test_builder
They use a bare assertRaises(ValueError, ring.RingBuilder, *,*,*), but
it's not clear which one raises which ValueError(), so I extend them to
validate the error strings as well.
Change-Id: I63280a9fc47ff678fe143e635046a0b402fd4506
2016年08月29日 17:20:48 +00:00
zhufl
d68b1bd6dd Remove unnecessary tearDown
This is to remove unnecessary tearDown to keep code clean.
Change-Id: Ie70e40d6b55f379b0cc9bc372a35705462cade8b
2016年08月29日 14:32:10 +08:00
Jenkins
0944753b37 Merge "Fix EC ring validation at ring reload" 2016年08月27日 01:01:24 +00:00
Matthew Oliver
d2fc261457 Authorise versioned write PUTs before copy
Currently a versioned write PUT uses a pre-authed request to move
it into the versioned container before checking whether the
user is authorised. This can lead to some interesting behaviour
whereby a user can select a versioned object path that it does not
have access to, request a put on that versioned object, and this
request will execute the copy part of the request before it fails
due to lack of permissions.
This patch changes the behaviour to be the same as versioned DELETE
where the request is authorised before anything is moved.
Change-Id: Ia8b92251718d10b1eb44a456f28d3d2569a30003
Closes-Bug: #1562175 
2016年08月26日 11:44:44 -04:00
Jenkins
9d08d17b4f Merge "Add "history" mode to versioned_writes middleware" 2016年08月26日 08:33:45 +00:00
Tim Burke
4d4885acdc Tighten header checks for object PUT/POST paths
Change-Id: If2cd059719fe5af1e73ecde5306e9f68d590831f
2016年08月25日 17:39:00 -07:00
Clay Gerrard
c1ef6539b6 add test for expirer processes == process
This is a follow up from a change that improved the error message.
Related-Change: I3d12b79470d122b2114f9ee486b15d381f290f95
Change-Id: I093801f3516a60b298c13e2aa026c11c68a63792
2016年08月25日 11:01:19 -07:00
zheng yin
01477c78c1 Fix ValueError information in obj/expirer
I fix error information in raise ValueError(...)
For example:
 if a>=b:
 # It should be under below and not 'a must be less than or equal to b'
 raise ValueError('a must be less than b')
Change-Id: I3d12b79470d122b2114f9ee486b15d381f290f95
2016年08月25日 15:37:42 +08:00
Jenkins
e7242af29a Merge "Improve readability in the obj server's unit tests" 2016年08月25日 04:22:55 +00:00
Jenkins
714384a716 Merge "Add Pros/Cons docs for global cluster consideration" 2016年08月25日 00:38:47 +00:00
Jenkins
181c7513c1 Merge "Get ready for os-api-ref sphinx theme change" 2016年08月25日 00:04:29 +00:00
zheng yin
b81f53b964 Improve readability in the obj server's unit tests
This change improves the readability of the object-server's unit
tests by breaking down some long assertTrue statements into smaller
and much easier to read and more relevant assert statements.
For example:
 assertTrue(a in resp.headers and
 b in resp.headers and
 c not in resp.headers)
Is equal to:
 assertIn(a, resp.headers)
 assertIn(b, resp.headers)
 assertNotIn(c, resp.headers)
Change-Id: Iba746ecfb1a1dc541856b7a4c9d2f00d08e4ad51
2016年08月24日 10:10:12 +08:00
Jenkins
075b081cb1 Merge "Fix typos and grammer in builder.py" 2016年08月23日 22:09:12 +00:00
Jenkins
09346fe028 Merge "Ignore auditor status files to prevent replicator reports errors" 2016年08月23日 12:07:06 +00:00
Jenkins
7e8d7a772d Merge "Tighten up direct client unit tests" 2016年08月23日 12:04:00 +00:00
Jenkins
a238b397db Merge "Follow up delayed reap probe test" 2016年08月23日 07:26:05 +00:00
Mohit Motiani
89388bf232 Fix typos and grammer in builder.py
Change-Id: Ib87f4df8f741809840e92db9bacf2af847a5f77f
Closes-Bug: #1600403 
2016年08月22日 12:46:23 -07:00
Victor Stinner
d98928caa9 py3: tox.ini: use substituation to py35 commands
Use tox substitution to avoid duplicating testenv:py34 commands in
testenv:py35, to not have to maintain the whitelist of Python 3 tests
in two different places.
Write also the list of tests in a newline to be able to more easily
add new unit tests.
Change-Id: I6e7f238f1c5d3fc9b6560918dcbb93e9dd8ec084
2016年08月22日 10:44:17 +02:00
Jenkins
29d13b7161 Merge "Reset AccountReaper stats in __init__" 2016年08月19日 19:20:02 +00:00
Graham Hayes
aa893d9077 Get ready for os-api-ref sphinx theme change
Change-Id: Ib4aa4a26814273efafa3453237d18acf8cc966cb
2016年08月19日 16:44:07 +01:00
Jenkins
5e0178d75b Merge "Documantation enhancements of nice/ionice feature" 2016年08月19日 08:36:40 +00:00
Peter Lisák
8bf2233b40 Documantation enhancements of nice/ionice feature
Based on comments from patch #238799.
Change-Id: I9455cf6dc7fd12fee62439ff3c5f3255287ab1be
2016年08月19日 07:39:49 +02:00
Jenkins
c643c261d1 Merge "Improve doc for using container-sync with large objects" 2016年08月19日 03:56:51 +00:00
Jenkins
a2b7fafde2 Merge "Make log information format" 2016年08月19日 03:56:07 +00:00
Jenkins
1c74fbec02 Merge "Use more specific asserts in test/unit/proxy tests" 2016年08月19日 03:54:49 +00:00
Jenkins
fbe181cbee Merge "Add test for POST to DLO manifest file" 2016年08月18日 23:25:54 +00:00
Janie Richling
13747021a8 Add test for POST to DLO manifest file
In the past, a POST to a DLO manifest file when object_post_as_copy
was true resulted in the manifest file contents being replaced
by the concatenation of the DLO segments. This no longer
happens, but tests for this case are missing.
This patch adds a functional test to assert that the manifest
file is preserved in a POST request.
Change-Id: I90546014a7dcc7266f0d0e0ff6339688b7954b96
Related-bug: #1487791
Related-bug: #1514317 
2016年08月18日 09:31:57 -05:00