8474 Commits

Author SHA1 Message Date
Zuul
5cb53838a6 Merge "py3: (mostly) port probe tests" 2019-09-12 00:49:29 +00: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
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
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
Zuul
c51335d8c0 Merge "Fix test_parse_get_node_args" 2019-08-20 04:57:06 +00:00
Zuul
665197f137 Merge "py3: fix up swift-orphans" 2019-08-20 04:57:04 +00:00
Thiago da Silva
94366fd00e Add Dockerfile to build a py3 swift docker image
This patch contains only a new Dockerfile and few changes to
be able to build both py2 and py3 images.

Next patch should contain changes to add the gate jobs to build
a py3 docker image

Change-Id: Ifdebde9597a787abcd553756e22261e2faaeedfc
2019-08-19 22:31:41 +02:00
Clay Gerrard
e921913065 Rename symlink method
Related-Change-Id: I179ea6180d31146bb947061c69b1807c59529ac8
Change-Id: I770ea1be25e339e5ce4341b532a1fff9e1373152
2019-08-19 11:06:32 -05:00
Clay Gerrard
82e427a8b1 Fix symlink docstring
Related-Change-Id: I179ea6180d31146bb947061c69b1807c59529ac8
Change-Id: I41cbf445057be09a102ef5515a9ce6a4f14e7458
2019-08-19 10:57:00 -05:00
Tim Burke
74db367060 py3: Finish porting func tests
We were (indirectly) importing swiftclient (and therefore requests and
urllib3) before doing our eventlet monkey-patching. This would lead
boto3 (which digs an SSLContext out of urllib3) to trip RecursionErrors
on py3 similar to

   >>> from ssl import SSLContext, PROTOCOL_SSLv23
   >>> import eventlet
   >>> eventlet.monkey_patch(socket=True)
   >>> SSLContext(PROTOCOL_SSLv23).options |= 0
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/usr/lib/python3.6/ssl.py", line 465, in options
       super(SSLContext, SSLContext).options.__set__(self, value)
     File "/usr/lib/python3.6/ssl.py", line 465, in options
       super(SSLContext, SSLContext).options.__set__(self, value)
     File "/usr/lib/python3.6/ssl.py", line 465, in options
       super(SSLContext, SSLContext).options.__set__(self, value)
     [Previous line repeated 330 more times]
   RecursionError: maximum recursion depth exceeded while calling a Python object

Change-Id: I4bb59edd87336597791416c4f2a096efe0e72fe3
2019-08-16 20:34:16 -07:00
Zuul
9b4b57a880 Merge "py3: port SLO func tests" 2019-08-17 03:19:22 +00:00
Zuul
cf10f39102 Merge "Allow bulk delete of big SLO manifests" 2019-08-17 02:42:02 +00:00
Zuul
202a5d34eb Merge "dlo: Respond 200 on multi-range GETs" 2019-08-17 01:38:19 +00:00
Tim Burke
a21c0be70c dlo: Respond 200 on multi-range GETs
We already had a unit test for this, but it was inadvertently retesting
what test_get_suffix_range_many_segments tested.

Change-Id: I43eee7029ca884268c3f2ad74300b94b299fd8d2
Closes-Bug: #1831790
2019-08-16 16:35:34 -07:00
Tim Burke
7f42309a33 py3: Cover account/container func tests
Change-Id: I9a754f1eb06debbe16800a05fc8e969af2f89043
2019-08-16 10:51:55 -07:00
Thiago da Silva
3e7752d8c8 Update docker image to latest Alpine 3.10.1
Change-Id: I888c51a965ee27175584f575560a1d50f4534663
2019-08-16 18:30:13 +02:00
Tim Burke
1abc9c4f9d Allow "static symlinks"
... by embedding something like `If-Match: <etag>` semantics in the
symlink.

When creating a symlink, users may now specify an optional
X-Symlink-Target-Etag header. If present, the etag of the final object
returned to the client will be checked; if it does not match the
X-Symlink-Target-Etag header, a 409 Conflict error will be returned to
the client.

Note that, unlike "dynamic symlink" behavior, the target object must
exist with the matching Etag for the "static symlink" to be created.

Since we're validating the Etag anyway, we also set the content-type of
the symlink to match if the client didn't otherwise specifiy and send
the etag & content-length along to the container listing as well.

Bonus goodness:

- Tighten assertions on Content-Location
- Get rid of swift.source-sniffing by making versioned_writes
  symlink-aware ('cause I'm going to want to make it symlink-aware
  later anyway)
- Allow middlewares left of symlink to set their own
  Container-Update-Override-Etag when creating a symlink
- Set dynamic symlink content type if client doesn't supply something

Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Change-Id: I179ea6180d31146bb947061c69b1807c59529ac8
2019-08-16 11:22:36 -05:00
Zuul
2a54619609 Merge "py3: port dlo func tests" 2019-08-16 13:48:41 +00:00
Zuul
186346443d Merge "Fixing broken links" 2019-08-16 12:21:57 +00:00
Alexandra Settle
0c16fd9536 Fixing broken links
Small changes, but helpful, mostly.

Backport: stein rocky

Change-Id: Ic4b6524d7804d2f74b2973b6acdb9e2679209cd4
2019-08-16 11:45:52 +00:00
Tim Burke
3750285bc8 py3: fix up listings on sharded containers
We were playing a little fast & loose with types before; as a result,
marker/end_marker weren't quite working right. In particular, we were
checking whether a WSGI string was contained in a shard range, while
ShardRange assumes all comparisons are against native strings.

Now, get everything to native strings before making comparisons, and
get them back to wsgi when we shove them in the params dict.

Change-Id: Iddf9e089ef95dc709ab76dc58952a776246991fd
2019-08-15 12:34:02 -07:00
Tim Burke
27e7e80e92 py3: fix up swift-orphans
Change-Id: Id1280abd92e8bb02fcaa4701a0e9d211d9d6e33e
2019-08-15 10:34:54 -07:00
Zuul
a2a1ebe7a3 Merge "py3: fix object-replicator rsync output parsing" 2019-08-15 04:51:03 +00:00
Zuul
8083255e34 Merge "py3: mostly port s3 func tests" 2019-08-15 01:10:29 +00:00
Zuul
6e84553318 Merge "py3: port test/functional/test_versioned_writes.py" 2019-08-14 22:17:03 +00:00
Zuul
0bdff31498 Merge "fix ec overview doc formatting" 2019-08-14 22:17:00 +00:00
Zuul
83c033106f Merge "Add params to get_*_metadata internal client methods" 2019-08-14 20:14:54 +00:00
Zuul
61881797c7 Merge "s3api: Translate 503 to S3-style 503s" 2019-08-14 18:26:01 +00:00
Thiago da Silva
9e9c363361 fix ec overview doc formatting
Change-Id: I3fee824e4fdc21aac21a6bb97f24a82d8ea3577d
2019-08-14 18:00:50 +02:00
Thiago da Silva
47c7058259 Add params to get_*_metadata internal client methods
Change-Id: I1d2d063904447a444ecb506b93ee698a5181b6b9
2019-08-14 16:13:25 +02:00
Samuel Merritt
cb30811916 Allow bulk delete of big SLO manifests
If you set SLO's max_manifest_segments to a value larger than 10000,
then clients are able to create manifests with that many segments, but
unable to use "?multipart-manifest=delete" to delete them.

This is because the SLO middleware has its very own bulk-deleter that
it uses to handle such requests, and that bulk-deleter only allows
10000 deletions per request by default. This commit removes the
limitation so that any SLO manifest can be deleted along with its
segments.

I considered setting max-deletes-per-request to be equal to SLO's
max_manifest_segments, but that only works if max_manifest_segments
has never been decreased.

Note that this commit does not increase max_manifest_segments. Clients
cannot make SLOs any bigger than they could before. Also note that
this commit does not affect user-initiated bulk deletes, i.e. POST
requests with "?bulk-delete=true" set. Those requests are still
limited in their size, and those limits are not changed.

Change-Id: I6a35937e8418f4f2b8e29825fc9c40415e34742f
Closes-Bug: 1746685
2019-08-13 16:51:50 -07:00
Zuul
196113f93e Merge "Consolidate Container-Update-Override headers" 2019-08-13 02:52:08 +00:00
Zuul
ff62cff01b Merge "Allow Connection: value to be case-insensitive" 2019-08-10 03:57:34 +00:00
Tim Burke
227fe30251 py3: port test/functional/test_versioned_writes.py
Change-Id: I8c2517599a6d1cdf68050dc7acb039f09875fd53
2019-08-09 22:04:55 -05:00
Tim Burke
f05119c16f py3: mostly port s3 func tests
test_bucket.py is proving somewhat problematic.

Change-Id: I5b337ef66a23fc989762801dd6a5ba1ed903f57b
2019-08-09 16:09:55 -07:00
Pete Zaitcev
c90365f98d Allow Connection: value to be case-insensitive
Proxies and LBs parse the Connection: header and re-insert
the value with random casing. This occurs when we run functional
tests against realistic clusters.

Change-Id: Icb0d3e3708949127e9750f2022de8c74ce51ebe9
2019-08-09 15:06:47 -05:00
Zuul
394d4655fa Merge "slo: Add X-Manifest-Etag to responses" 2019-08-09 17:21:47 +00:00