0e7fca576cee81dd6ca8774760cb880c3fff9c1c
Commit Graph

5581 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
Jenkins
fad838a26e Merge "Add X-Delete-After and X-Delete-At functional test" 2016年03月02日 18:49:18 +00:00
Takashi Kajinami
8e4347afd5 Fix proxy-server's support for chunked transferring in GET object
Proxy-server now requires Content-Length in the response header
when getting object and does not support chunked transferring with
"Transfer-Encoding: chunked"
This doesn't matter in normal swift, but prohibits us from putting
any middelwares to execute something like streaming processing of
objects, which can't calculate the length of their response body
before they start to send their response.
Change-Id: I60fc6c86338d734e39b7e5f1e48a2647995045ef
2016年03月02日 22:56:13 +09:00
Charles Hsu
6b4e73bb15 Fix account-reaper unable to delete all containers.
When reaper try to find the correct container_shard number,
but it doesn't compare local device's name, so it always
return first entry's index of local devices from the ring
to container_shard.
That causes some containers will be skip and objects under
these containers won't be delete.
Change-Id: I0e2bbdd99add86ee46e856920c0740c4aa13c77d
Closes-Bug: #1549615 
2016年03月02日 11:41:21 +08:00
Jenkins
3927bf1f17 Merge "Add object replicator's succeeded and failed counts in log" 2016年03月01日 16:22:49 +00:00
Jenkins
368423df3d Merge "Use uppercase 'S' in word "OpenStack"" 2016年03月01日 16:21:41 +00:00
Samuel Merritt
22685d6231 Faster suffix invalidations on object PUT/DELETE
Before this commit, we performed a full read-modify-write cycle on a
partition's hashes.pkl to invalidate the relevant suffix whenever an
object PUT or DELETE completes.
Now we append invalid suffixes to a new file, "hashes.invalid",
alongside hashes.pkl. When we actually get a REPLICATE request and
need to compute the hashes, *then* we perform a full read-modify-write
on hashes.pkl and clear out hashes.invalid.
Change-Id: Ia7add438e25688b4b286f0110a4e43490e11ad75
2016年03月01日 13:54:09 +00:00
Takashi Kajinami
9dda1c9526 Update parameters about authtoken middleware in proxy-server.conf.sample
This patch replaces some configration parameters about authtoken
middleware in proxy-server.conf, which will be deprecated.
The following parameters are to be deprecated.
 auth_admin_prefix, auth_host, auth_port, auth_protocol,
 identity_uri, admin_token, admin_user, admin_password,
 admin_tenant_name
Change-Id: I373734933189c87c4094203b0752dd3762689034
2016年03月01日 08:03:43 +09:00
Andreas Jaeger
087fa4fa01 Remove unused pngmath Sphinx extension
There's no RST file that uses ".. math" and thus
the pngmath Sphinx extension is not used and can
get removed.
Change-Id: I3ea4b529025c8ac3c4092f3720124647861e6668
2016年02月29日 20:00:38 +01:00
Hisashi Osanai
9c5b01e7c7 Add container quota functional test
This patch provides one container quota functional test.
Change-Id: I16354c15fc434d70f9bb6b9b1e18b09357195c83
2016年02月29日 16:41:45 +00:00
Kota Tsuyuzaki
6d8be59fce Fix ringbuilder tests
Some of tests in test/unit/cli/test_ringbuilder doesn't assert
the exit code and unfortunately some of these passed even if the
statement fails for the assertion actually.
This patch enables to assert the exit code from ringbuider and
fixes some code/test bugs I noticed.
Change-Id: I18fa675ba8a90678e2b5ccb5f90eafab01d22787
2016年02月29日 08:03:45 -08:00
Hisashi Osanai
efdc6ee8db Add X-Delete-After and X-Delete-At functional test
This patch provides functional tests for X-Delete-After and X-Delete-At.
Change-Id: I55b0d0584428413aa7a31f66defec55f9b1bbcd9
2016年02月29日 11:51:07 +00:00
Bill Huber
0628f1268c Add unit tests for swift.account.reaper
This patch adds more unit tests to diminish missing pieces
of the coverage in the account_reaper unit test.
Change-Id: Ib9e875ddd1334a4a67037dcfbd42d3b008ccd4e7
2016年02月29日 09:54:44 +00:00
Takashi Kajinami
bd93d44bb4 Make sure all temp files get deleted in test_ringbuilder
This patch makes test_ringbuilder create a temporal directory,
run ring builder commands under it, and delete it after testing
for each test cases, to fix temp file leaking.
Change-Id: I6f59fe095ea6485af0e60b5a8e8fc3892e0a0f90
2016年02月29日 18:21:46 +09:00
Cheng Li
2d73dd9e66 keep etag of target source instead of possible_source
In proxy/controllers/base.py : ResumingGetter._get_source_and_node
self.used_source_etag should be etag of target source
instead of possible_source.
Change-Id: Id6c33e79f65cb4ad9e3249957dd57dc2da8cad98
Closes-bug: #1550734 
2016年02月27日 23:26:47 +08:00
Jenkins
61928443ed Merge "Fix inconsistent suffix hashes after ssync of tombstone" 2016年02月26日 23:37:44 +00:00
Jenkins
d8a5bf880f Merge "Fix StatsD tests to not use real DNS" 2016年02月26日 21:39:40 +00:00
benjkeller
10b5765c60 Rename test_object_delete_at_aysnc
This renames test_object_delete_at_aysnc to
test_object_delete_at_async to match with the function
async_update which it tests.
Change-Id: I726afcbf08a3449c7af2834e573b97be378a86cd
Closes-Bug: 1550067
2016年02月25日 18:57:53 -06:00
John Dickinson
9e53bb47ef updated some weird whitespace character to a normal one
Change-Id: I187fb8fc8d10f950bbebc586999eced0bc117432
2016年02月24日 09:48:57 -08:00
Alistair Coles
54e53ae87b Silence SkipTest noise in in-process test teardown
setup_package and teardown_package get called twice when
running functional tests using nose. With in-process mode
the first call to teardown_package clears global config
which causes the test swiftclient to raise a SkipTest error
during the second call to teardown_package.
To reproduce:
SWIFT_TEST_IN_PROCESS=1 nosetests ./test/functional/test_account.py
This patch simply tests for config existence before attempting
to create a test swiftclient in the teardown_package function.
Also fix a related issue whereby in_process flag would be reset to
False during second call to setup_package, thus causing some of the
in process cleanup in teardown_package to never be executed.
Change-Id: I074dcd3d39aa46b262632024b047556ca471e8b8
2016年02月24日 14:41:28 +00:00
Jenkins
090d7c9764 Merge "Add warn method back to LogAdapter" 2016年02月24日 06:24:39 +00:00
Jenkins
dff21a803e Merge "fix formatting of bulk operations doc" 2016年02月24日 03:30:49 +00:00
Jenkins
abd3e06300 Merge "Reduce code duplication" 2016年02月24日 03:30:41 +00:00
Jenkins
885e219164 Merge "Mock sleep in direct_client retry tests" 2016年02月24日 03:30:31 +00:00
Jenkins
f75e4f2d77 Merge "Add option for label to static web listings" 2016年02月24日 03:30:07 +00:00
Jenkins
8f0ba56d0d Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2016年02月24日 03:29:59 +00:00
Jenkins
66e25d1eec Merge "Fix object-server to handle newer ts file" 2016年02月24日 03:29:02 +00:00
Clay Gerrard
076134784b Add warn method back to LogAdapter
The change in 684c4c04 to improve py3 support breaks older middleware
that consumes the SwiftLogger.
Good for Swift code to not to use warn because it's deprecated.
Bad for LogAdapter to not faithfully provide the current python logging
module API (deprecated or otherwise).
Change-Id: Ib0baf66b7f33f91562867076ff0526a287d8e5a6
2016年02月23日 17:45:13 -08:00
Samuel Merritt
eb7ca115e6 Fix StatsD tests to not use real DNS
In common/test_utils.py, TestStatsdLogging had the majority of its
test cases calling the real socket.getaddrinfo(), which uses real
DNS. This is very slightly slower than using a mock getaddrinfo() when
the machine running the tests has functioning DNS, but on a machine
with no network connection at all, the tests are excruciatingly slow
due to timeouts.
This commit mocks things out as appropriate. There's still one user of
the real getaddrinfo(), but it's for ::1, so that's just local
resolution based on /etc/hosts.
Timing numbers for "./.unittests test.unit.common.test_utils:TestStatsdLogging":
 * network, without this patch: 1.8s
 * no network, without this patch: 221.2s (ouch)
 * network, with this patch: 1.1s
 * no network, with this patch: 1.1s
Change-Id: I1a2d6f24fc9bb928894fb1fd8383516250e29e0c
2016年02月23日 14:00:34 -08:00
Thiago da Silva
b97adf70ad fix formatting of bulk operations doc
Change-Id: I247d2867c55d6bbf2288dfb74271f57c6f88b243
2016年02月23日 16:24:21 -05:00
Clay Gerrard
cfd5021235 dry out container unittests
Change Ifcc4392ffa4df485ce3c62a35d0fcc8c93de74aa introduced
TestContainerController4Replicas as a subclass of
TestContainerController. And there is duplicated code
block to override setUp method.
This patch removed the duplicated code block.
Change-Id: Iad0b64cba52554b89dbd959475a2ce7c0d9a20eb
2016年02月23日 09:17:56 +00:00
Janie Richling
b5a243e75a Set backend content length for fallocate - EC Policy
Currently, the ECObjectController removes the 'content-length' header.
This part is ok, except that value is being used to set
'X-Backend-Obj-Content-Length', so it is always 0. This leads to not
calling fallocate (details on bug) on a PUT since the size is 0.
This change makes use of some numbers returned from the EC Driver
get_segment_info method in order to calculate the expected on-disk
size that should be allocated. The EC controller will now set the
'X-Backend-Obj-Content-Length' value appropriately.
Co-Authored-By: Kota Tsuyuzaki
Co-Authored-By: John Dickinson
Co-Authored-By: Tim Burke
Change-Id: Ifd16c1438539e6fd9bb2dbcd053d11bea2e09fee
Fixes: bug 1532008
2016年02月22日 15:27:53 -06:00
Jenkins
d9f500a128 Merge "Make _get_addr() method a function in utils." 2016年02月22日 20:30:22 +00:00
Jenkins
3e3ad5cb16 Merge "Fail early if the memcache address is invalid." 2016年02月22日 19:42:20 +00:00
Jenkins
c4284f89f0 Merge "Use 201 insted of 200 in PUT test case" 2016年02月22日 19:41:23 +00:00
Jenkins
01b07026c0 Merge "Changing the base version to python2.7 for pep8 checks" 2016年02月22日 19:40:27 +00:00
Jenkins
bc34f79163 Merge "Add unit tests for checking responses in ContainerController" 2016年02月22日 12:35:41 +00:00
Jenkins
d53210e1d6 Merge "functest for x-timestamp validation" 2016年02月22日 10:22:11 +00:00
Takashi Kajinami
406e8996fb Use 201 insted of 200 in PUT test case
There are some unit test cases which assumes 200 as the response
of PUT request, but 200 is never returned in PUT.
This patch replaces 200 in PUT by 201, and adapt unit test cases
to real case.
Change-Id: I35fc7a4fe7fcc5558a9e6c6371105793c2710f3e
2016年02月22日 16:10:09 +09:00
Hisashi Osanai
5b18455cef Add unit tests for checking responses in ContainerController
This patch provides unit tests to check responses for various situation
in three/four replicas env.
Change-Id: Ifcc4392ffa4df485ce3c62a35d0fcc8c93de74aa
2016年02月22日 16:08:23 +09:00
Jenkins
99bc2a4a7d Merge "Fixed log format in object auditor" 2016年02月19日 22:21:44 +00:00
Jenkins
b510442b15 Merge "Make write-only container access consistent" 2016年02月19日 12:56:38 +00:00
Jenkins
9f2a7b1d2f Merge "Add unit tests for checking responses in AccountController" 2016年02月19日 07:23:53 +00:00
Tim Burke
002513d217 Make write-only container access consistent
Previously, if a user could write to (but not read from) a container,
the behavior for object POST would vary depending on whether
object_post_as_copy was enabled (403 response) or disabled (202
response).
Now, POSTs will consistently be allowed, regardless of whether fast-POST
is enabled.
Change-Id: I1d6dcbc4f5034a322a1073850fc3b059ebb1c0fa
2016年02月18日 15:45:15 -08:00
Ondřej Nový
9a6c6b5571 Fixed log format in object auditor
Change-Id: I218e08446c5ffda2db7c774ec8bb9d28ce9f63e7
2016年02月18日 17:38:42 +01:00
Alistair Coles
2d55960a22 Fix inconsistent suffix hashes after ssync of tombstone
Consider two replicas of the same object whose ondisk files
have diverged due to failures:
 A has t2.ts
 B has t1.data, t4.meta
(The DELETE at t2 did not make it to B. The POST at t4 was
rejected by A.)
After ssync replication the two ondisk file sets will not be
consistent:
 A has t2.ts (ssync cannot POST t4.meta to this node)
 B has t2.ts, t4.meta (ssync should not delete t4.meta,
 there may be a t3.data somewhere)
Consequenty the two nodes will report different hashes for the
object's suffix, and replication will repeat, always with the
inconsistent outcome. This scenario is reproduced by the probe
test added in this patch.
(Note that rsync replication does result in (t2.ts, t4.meta)
on both nodes.)
The solution is to change the way that suffix hashes are
calculated. Currently the names of *all* files found in each
object dir are added to the hash. With this patch the
timestamps of only those files that could be used to
construct a valid diskfile are added to the hash. File
extensions are appended to the timestamp so that in most
'normal' situations the result of the hashing is the same
as before this patch. That avoids a storm of hash mismatches
when this patch is deployed in an existing cluster.
In the problem case described above, t4.meta is no longer
added to the hash, since it is not useful for constructing
a diskfile. (Note that t4.meta is not deleted because it
may become useful should a t3.data be replicated in future).
Closes-Bug: 1534276
Change-Id: I99e88b8d5f5d9bc22b42112a99634ba942415e05
2016年02月18日 15:45:10 +00:00
Jenkins
ebe61381c2 Merge "Keep the Usage of exit()/sys.exit() Consistent" 2016年02月18日 14:26:49 +00:00
Kota Tsuyuzaki
ddeb0cde9f Fix object-server to handle newer ts file
Swift object-server will return 409 Conflict when the incomming
request X-Timestamp is older than the local disk file to prevent
wasted data transfer and disk space consumption. However, IFF,
the local disk file is a tombstone, current object-server will
write the data in the device and cleanup it according to timestamp
comparison result in hash_cleanup_list_dir, and then return 201
Created. That's wasted and far from the semantics in the normal case.
This patch fixes object-server to catch the DiskFileDeleted exception
at PUT request, and then, set the timestamp from tombstone as
original_timestamp to be able to compare with request timestamp.
Co-Authored-By: Kazuhiro Miyahara <miyahara.kazuhiro@lab.ntt.co.jp>
Change-Id: I078c9cb90707a3c320708e76ea42cbfa73e1ea4b
Closes-Bug: #1546865 
2016年02月18日 02:13:01 -08:00
Béla Vancsics
878688cae0 Reduce code duplication
Reduced source code by extracting duplicated code
(swift/common/direct_client.py)
http://openqa.sed.hu/dashboard/index/5?did=1
Change-Id: I47fa6ae12c646e8e42fb0a46a017971f05d883fc
Closes-Bug: 1536067
2016年02月18日 09:59:56 +01:00
Kazuhiro MIYAHARA
c3201f256c Remove execute permissions from doc files and swift.conf-sample
Some doc files and swift.conf-sample were added execute permissions in past changes.
This patch remove execute permissions from them.
Change-Id: Id8844989a8321578e9207566ebd6660f5b9523f0
2016年02月18日 08:52:03 +00:00
Jenkins
f73b7a5d64 Merge "Bump PyECLib requirement to >= 1.2.0" 2016年02月18日 00:27:40 +00:00