8513 Commits

Author SHA1 Message Date
Zuul
6fbbaa910c Merge "func tests: Add more UTF8 tests for versioning" 2019-09-25 08:05:59 +00:00
Tim Burke
50255de0e3 func tests: Add more UTF8 tests for versioning
Change-Id: I7ac111bd8b57bd21c37f4c567a20e2c12957b2ff
2019-09-25 02:47:39 +00:00
Zuul
f2b2670c65 Merge "Make ceph tests more portable" 2019-09-25 00:31:51 +00:00
Thiago da Silva
6271d88f9e Add func test for changing versionining modes
Users are able to change versioning in a container
from X-Versions-Location to X-History-Location, which affects
how DELETEs are handled. We have some unit tests that check this
behavior, but no functional tests.

This patch adds a functional test that helps us understand and
document how changing modes affects the handling of DELETE
requests.

Change-Id: I5dbe5bdca17e624963cb3a3daba3b240cbb4bec4
2019-09-24 17:16:48 +00:00
Zuul
2abdd2d70d Merge "bufferedhttp: ensure query params are properly quoted" 2019-09-21 05:54:34 +00:00
Zuul
41f32ef62f Merge "doc: Fix the swift middleware doc needs more info to set s3 api" 2019-09-21 04:03:36 +00:00
Zuul
a50bf6f379 Merge "Sharding: Clean up old CleaveConext's during audit" 2019-09-20 16:14:20 +00:00
Zuul
81f4d6b530 Merge "We don't have to keep the retrieved token anymore" 2019-09-20 01:50:24 +00:00
Zuul
9a47630a13 Merge "Find .d pid files with swift-orphans" 2019-09-20 01:50:19 +00:00
Zuul
d103de57a2 Merge "Update the constraints url" 2019-09-20 01:50:18 +00:00
Zuul
1c29bd678c Merge "Allow non-default domain to be used in func tests" 2019-09-20 01:00:02 +00:00
Zuul
1250c2ae1d Merge "Fix invalid assert states" 2019-09-20 01:00:00 +00:00
Zuul
0da3cf700c Merge "Update the bandit.yaml available tests list" 2019-09-20 00:59:58 +00:00
Zuul
6ecc9c0bc0 Merge "[train][goal] Run 'tempest-ipv6-only' job in gate" 2019-09-19 22:29:41 +00:00
Zuul
8e2f03ee2b Merge "Close leaking opened requests" 2019-09-19 00:36:58 +00:00
Zuul
dd1eacb7c5 Merge "Skip test when object versioning is not enabled" 2019-09-19 00:23:49 +00:00
Zuul
28f292f290 Merge "versioned_writes: checks for SLO object before copy" 2019-09-18 21:10:55 +00:00
Zuul
450fc5bf2f Merge "Add python3 to setup.cfg" 2019-09-18 18:01:20 +00:00
Matthew Oliver
81a41da542 Sharding: Clean up old CleaveConext's during audit
There is a sharding edge case where more CleaveContext are generated and
stored in the sharding container DB. If this number get's high enough,
like in the linked bug. If enough CleaveContects build up in the DB then
this can lead to the 503's when attempting to list the container due to
all the `X-Container-Sysmeta-Shard-Context-*` headers.

This patch resolves this by tracking the a CleaveContext's last
modified. And during the sharding audit, any context's that hasn't been
touched after reclaim_age are deleted.

This plus the skip empty ranges patches should improve these handoff
shards.

Change-Id: I1e502c328be16fca5f1cca2186b27a0545fecc16
Closes-Bug: #1843313
2019-09-18 17:10:36 +10:00
Thiago da Silva
20fc16e8da Close leaking opened requests
Change-Id: I3d96022c01834c85e9795ea41d18b17624a33a19
Co-Authored-By: Tim Burke <tim.burke@gmail.com>
2019-09-17 18:57:35 +02:00
Thiago da Silva
9698b1bb95 Skip test when object versioning is not enabled
Change-Id: I671a6e4a3d1011dbbc2267b44134cfaf3380fb22
2019-09-17 16:52:55 +02:00
Ghanshyam Mann
75c9c636f2 [train][goal] Run 'tempest-ipv6-only' job in gate
As part of Train community goal 'Support IPv6-Only Deployments and Testing'[1],
Tempest has defined the new job 'tempest-ipv6-only'(adding
in Depends-On patch) which will deploy services on IPv6 and run smoke
tests and IPv6 related tests present in Tempest.

This job will be part of Nova, Neutron, Cinder, Keystone, Glance, Swift
gate.

Verification structure will be:
- 'devstack-IPv6' deploy the service on IPv6
- 'devstack-tempest-ipv6' run will verify the IPv6-only setting and listen address
- 'tempest-ipv6-only' will run the smoke + IPv6 related test case.

This commit adds the new job 'tempest-ipv6-only' run on gate.

Story: #2005477
Task: #35932

[1] https://governance.openstack.org/tc/goals/train/ipv6-support-and-testing.html

Change-Id: I78be2ee5a7f1e5d3188ece98d7d8324f1c9bd0e3
2019-09-17 12:48:57 +00:00
Zuul
6339bd8f6c Merge "Allow arbitrary UTF-8 strings as delimiters in listings" 2019-09-16 19:51:03 +00:00
Nguyen Quoc Viet
b4288b4aa6 versioned_writes: checks for SLO object before copy
Previously, versioned_writes middleware copy an already existing
object using PUT. However, SLO requires the additional query
to properly update the object size when listing.

Propose fix: In _put_versioned_obj - which is called when on
creating version obj and also on restoring obj,
if 'X-Object-Sysmeta-Slo-Size' header is present it will
add needed headers for container to update obj size

Added a new functional test case with size assertion for slo

Change-Id: I47e0663e67daea8f1cf4eaf3c47e7c8429fd81bc
Closes-Bug: #1840322
2019-09-15 20:30:56 +07:00
Zuul
1a8db04b5f Merge "Remove unneeded Zuul branch matcher" 2019-09-14 17:29:21 +00:00
Zuul
0790b62e1f Merge "tests/py3: Improve header casing" 2019-09-14 00:09:56 +00:00
Clay Gerrard
db8b0b6bc4 Make ceph tests more portable
Change-Id: If93325f2651a02f98f9d480c10bf7b849cc9617e
2019-09-13 15:32:58 -07:00
Andreas Jaeger
3960df983b Remove unneeded Zuul branch matcher
We have implicit branch matchers, so there's no need to add a check
for not-ocata etc, a job is only run for the branch it's on - like
master now.

Remove it to not confuse Zuul when multiple branches matches and the job
definition is different.

Change-Id: I6a346c9141aad1aa8a7393c899d5571057073e7a
2019-09-13 09:38:22 +02:00
Tim Burke
49f62f6ab7 bufferedhttp: ensure query params are properly quoted
Recent versions of py27 [1] have begun raising InvalidURL if you try to
include non-ASCII characters in the request path. This was observed
recently in the periodic checks of stable/ocata and stable/pike. In
particular, we would spin up some in-process servers in
test.unit.proxy.test_server.TestSocketObjectVersions and do a container
listing with a prefix param that included raw (unquoted) UTF-8. This
query string would pass unmolested through the proxy, tripping the
InvalidURL error when bufferedhttp called putrequest.

More recent versions of Swift would not exhibit this particular failure,
as the listing_formats middleware would force a decoding/re-encoding of
the query string for account and container requests. However, object
requests with errant query strings would likely be able to trip the same
error.

Swift on py3 should not exhibit this behavior, as we so
thoroughly re-write the request line to avoid hitting
https://bugs.python.org/issue33973.

Now, always parse and re-encode the query string in bufferedhttp. This
prevents any errors on object requests and cleans up any callers that
might use bufferedhttp directly.

[1] Anything after https://github.com/python/cpython/commit/bb8071a;
    see https://bugs.python.org/issue30458

Closes-Bug: 1843816
Change-Id: I73f84b96f164e6fc5d3cb890355871c26ed271a6
Related-Change: Id3ce37aa0402e2d8dd5784ce329d7cb4fbaf700d
Related-Change: Ie648f5c04d4415f3b620fb196fa567ce7575d522
2019-09-12 11:48:03 -07:00
Tim Burke
1ded0d6c87 Allow arbitrary UTF-8 strings as delimiters in listings
AWS seems to support this, so let's allow s3api to do it, too.

Previously, S3 clients trying to use multi-character delimiters would
get 500s back, because s3api didn't know how to handle the 412s that the
container server would send.

As long as we're adding support for container listings, may as well do
it for accounts, too.

Change-Id: I62032ddd50a3493b8b99a40fb48d840ac763d0e7
Co-Authored-By: Thiago da Silva <thiagodasilva@gmail.com>
Closes-Bug: #1797305
2019-09-12 10:44:00 -07:00
Zuul
5cb53838a6 Merge "py3: (mostly) port probe tests" 2019-09-12 00:49:29 +00:00
CY Chiang
4cafc3d656 doc: Fix the swift middleware doc needs more info to set s3 api
Modify the AWS S3 Api section in middleware document.
Add how to create ec2 credential and minimun configuration to use
s3 api.

Change-Id: Id4d614d8297662f16403fdfe526e14714a21249d
Closes-Bug: #1842884
2019-09-05 23:42:36 +08:00
Zuul
f4df7c31df Merge "diskfile: Add some argument validation" 2019-09-05 05:41:48 +00:00
Zuul
d1374d8d96 Merge "Fix a potential bug" 2019-09-05 05:41:45 +00:00
Tim Burke
1d7e1558b3 py3: (mostly) port probe tests
There's still one problem, though: since swiftclient on py3 doesn't
support non-ASCII characters in metadata names, none of the tests in
TestReconstructorRebuildUTF8 will pass.

Change-Id: I4ec879ade534e09c3a625414d8aa1f16fd600fa4
2019-09-04 10:17:45 -07:00
Tim Burke
c71bb25063 diskfile: Add some argument validation
Either all or none of account, container, and object should be provided.
If we get some but not all, that's indicating some kind of a coding bug;
there's a chance it may be benign, but it seems safer to fail early and
loudly.

Change-Id: Ia9a0ac28bde4b5dcbf6e979c131e61297577c120
Related-Change: Ic2e29474505426dea77e178bf94d891f150d851b
2019-08-30 21:49:48 -07:00
Zuul
4bd9003221 Merge "py3: Update Getting Started docs" 2019-08-31 00:50:09 +00:00
Tim Burke
e6e31410e0 Find .d pid files with swift-orphans
Change-Id: I7a2f19862817abf15e51463bd124293730451602
2019-08-30 11:54:47 -07:00
Tim Burke
3e4efb7aa4 py3: Update Getting Started docs
Change-Id: I94050c40585b397a9f7bab1e48650b89f70ab24d
2019-08-29 16:55:27 -07:00
Zuul
3ec6ce2a0f Merge "py3: fix up listings on sharded containers" 2019-08-28 07:37:16 +00:00
Tim Burke
4d83b9b95e tests/py3: Improve header casing
Previously, our unit tests with socket servers would let eventlet
capitalize headers on the way out, which

- isn't something we want to have eventlet do, because it
- breaks unicode-in-header-names on py3, so it
- is already disabled in swift.common.wsgi.run_server() for real servers.

Include a test to make sure we don't forget about it in the future.

Change-Id: I0156d0059092ed414b296c65fb70fc18533b074a
2019-08-26 14:44:05 -07:00
Ondřej Nový
a32fb30c16 Use SOURCE_DATE_EPOCH in docs to make build reproducible
Set copyright year and html_last_updated_fmt to SOURCE_DATE_EPOCH if
it's set. See https://reproducible-builds.org/specs/source-date-epoch/

This patch make build reproducible, see https://reproducible-builds.org/

Change-Id: I730a8265ca2c70c639ef77a613908e84eb738b70
2019-08-24 21:04:22 +02:00
Tim Burke
2545372055 py3: Switch swift-dsvm-functional-py3 to run tests under py3
Now that all of the func tests are ported, we may as well run all-py3.

Change-Id: Ib9f75ca9efb46dc4c7730ad2718228ec7777c924
2019-08-22 20:09:56 +00:00
Zuul
2cee9f750f Merge "py3: Finish porting func tests" 2019-08-22 08:13:41 +00:00
Tim Burke
ff5ea003b3 ec: log durability of frags that fail to reconstruct
Whether the frag is durable or non-durable greatly affects how much I
care whether I can reconstruct it.

Change-Id: Ie6f46267d4bb567ecc0cc195d1fd7ce55c8cb325
2019-08-20 22:23:00 -07:00
Zuul
f70520239c Merge "Fix symlink docstring" 2019-08-20 14:24:27 +00:00
Zuul
b066a827bb Merge "Rename symlink method" 2019-08-20 13:12:22 +00:00
Zuul
885a95e357 Merge "Add Dockerfile to build a py3 swift docker image" 2019-08-20 08:59:37 +00:00
Zuul
cfd8c3aac7 Merge "Update docker image to latest Alpine 3.10.1" 2019-08-20 08:47:42 +00:00
Zuul
fefa888c4b Merge "Allow "static symlinks"" 2019-08-20 06:20:15 +00:00