8435 Commits

Author SHA1 Message Date
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
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
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
Clay Gerrard
996aa4547f Consolidate Container-Update-Override headers
Related-Change-Id: I179ea6180d31146bb947061c69b1807c59529ac8
Related-Change-Id: I056edc68aee8c0db2a2c4a5b9e3d242a895975b3

Change-Id: I84bd29ae48ff1b0826794a8fdf9aa87670ad4aa4
2019-08-09 10:35:26 -05:00
Zuul
96ece6e18e Merge "py3: Add swift-tox-func-encryption-py37 gate job" 2019-08-09 08:19:36 +00:00
Tim Burke
3ee6de408e slo: Add X-Manifest-Etag to responses
This matches the ETag of the underlying swift object, as opposed to the
MD5-of-MD5s that is the large object's ETag.

Change-Id: Ifab726f63739f62aeef495c970939410341694d1
2019-08-08 14:20:05 -07:00
Tim Burke
e095bf3dab Bring our IPv6 setup more in line with devstack's
Change-Id: I4a32239eec37eed4085fbc2a283def4b69c816ac
2019-08-08 08:54:49 -07:00
Zuul
8d3d21e668 Merge "py3: port RBAC func tests" 2019-08-07 22:10:07 +00:00
Tim Burke
7bb7da6d2d s3api: Translate 503 to S3-style 503s
...instead of logging tracebacks about unexpected status codes.

Change-Id: Iadb0a40092b8347eb5c04785cc14d1324cc9396f
2019-08-06 14:52:54 -07:00
Tim Burke
2c727f65ff py3: Add swift-tox-func-encryption-py37 gate job
Change-Id: Ia9ae0fc226dfc9b40157faebac100c10a9180c62
2019-08-06 13:56:47 -07:00
Tim Burke
a10d936ee5 Use is to compare against sentinel object
...since `==` can have repercussions by way of __eq__()

Change-Id: I668b11251a3d1192d42dfe914010d089df413da7
2019-08-06 10:14:47 -07:00
Tim Burke
2e4c8a924e py3: port RBAC func tests
Yes, it really is just the import.

Change-Id: Id7e2891b6600af102176eaa2e87f81b528adde8d
2019-08-05 14:47:51 -07:00
Clay Gerrard
ab19241534 Increase node_timeout for real sever unittests
I saw an encryption test fail with 10s node timeout when the py36
unittests ran in the gate.  I believe there is an outsized potential for
a beneficial increase in test reliability when run in the gate compared
to relatively small chance of any negative side-effect in test failure
responsiveness.

Change-Id: Ia31912828d416d84c39782222e4636a97a8bfe44
2019-08-05 15:40:58 -05:00
Zuul
489a35db82 Merge "Make backport releases conform to existing CHANGELOG formatting" 2019-08-05 17:35:38 +00:00
Zuul
1e76f3c31b Merge "Give ECAppIter greenthreads a chance to wrap up" 2019-08-05 16:30:22 +00:00
Zuul
a9a57c7d54 Merge "Make GreenAsyncPile not hang" 2019-08-02 21:16:54 +00:00
Clay Gerrard
25aeb0ca49 Make GreenAsyncPile not hang
It's probably weird that StreamingPile has this interfaces that swallows
exceptions, but this seems better than hanging.

Change-Id: I8fe45c0f0d291efc84f3edf5d6b7cd116b5c7835
2019-08-02 08:19:41 -07:00
Zuul
9aaae58bdd Merge "Ignore 404s from handoffs for objects when calculating quorum" 2019-08-02 13:17:54 +00:00
Zuul
a563f4f5a6 Merge "sharding: better handle get_shard_ranges failures" 2019-08-02 13:17:51 +00:00
Zuul
b7b80f3a8a Merge "Negative test for non-empty chunked put symlink" 2019-08-02 05:48:04 +00:00
Zuul
5260e74161 Merge "symlink: Allow symlinks to be created via chunk-encoded PUTs" 2019-08-02 04:17:00 +00:00
Tim Burke
3189410f9d Ignore 404s from handoffs for objects when calculating quorum
We previously realized we needed to do that for accounts and containers
where the consequences of treating the 404 as authoritative were more
obvious: we'd cache the non-existence which prevented writes until it
fell out of cache.

The same basic logic applies for objects, though: if we see

    (Timeout, Timeout, Timeout, 404, 404, 404)

on a triple-replica policy, we don't really have any reason to think
that a 404 is appropriate. In fact, it seems reasonably likely that
there's a thundering-herd problem where there are too many concurrent
requests for data that *definitely is there*. By responding with a 503,
we apply some back-pressure to clients, who hopefully have some
exponential backoff in their retries.

The situation gets a bit more complicated with erasure-coded data, but
the same basic principle applies. We're just more likely to have
confirmation that there *is* data out there, we just can't reconstruct
it (right now).

Note that we *still want to check* those handoffs, of course. Our
fail-in-place strategy has us replicate (and, more recently,
reconstruct) to handoffs to maintain durability; it'd be silly *not* to
look.

UpgradeImpact:
--------------
Be aware that this may cause an increase in 503 Service Unavailable
responses served by proxy-servers. However, this should more accurately
reflect the state of the system.

Co-Authored-By: Thiago da Silva <thiagodasilva@gmail.com>
Change-Id: Ia832e9bab13167948f01bc50aa8a61974ce189fb
Closes-Bug: #1837819
Related-Bug: #1833612
Related-Change: I53ed04b5de20c261ddd79c98c629580472e09961
Related-Change: Ief44ed39d97f65e4270bf73051da9a2dd0ddbaec
2019-08-01 14:07:39 -07:00
Clay Gerrard
7678e94a2c Negative test for non-empty chunked put symlink
Change-Id: I0c3a235b8905e02d2e202215f7f0b43db295b79b
Related-Change-Id: I66f2f16d7cf0b9cb0888e3b9b1a17b9112233d21
2019-08-01 09:34:03 -05:00
Zuul
d33e569bee Merge "py3: Fix title-casing in HeaderKeyDict" 2019-07-30 08:13:26 +00:00
Tim Burke
c19d09f60b Give ECAppIter greenthreads a chance to wrap up
Otherwise, we can hit a "generator already executing" error in
test/functional/test_slo.py:TestSlo.test_slo_multi_ranged_get

Also, set a *slightly* newer lower-bound for greenlet (from 2011 instead
of 2010) so the sleep() doesn't cause us to lose exception state.

Change-Id: Id458fc0a43fd71aab9f6edbacc1f0b370c9f7537
2019-07-29 12:11:34 -07:00
Zuul
6a1b2de6bb Merge "Add integrated gate tempest and grenade job" 2019-07-27 08:29:32 +00:00
Tim Burke
a1455b3a35 symlink: Allow symlinks to be created via chunk-encoded PUTs
... provided they're still zero bytes.

Change-Id: I66f2f16d7cf0b9cb0888e3b9b1a17b9112233d21
2019-07-26 21:40:37 -07:00
Zuul
bddcb5cf36 Merge "py3: fix non-ascii metadata handling in account-server" 2019-07-27 01:56:32 +00:00
Tim Burke
8635e8cc86 Make backport releases conform to existing CHANGELOG formatting
Change-Id: Ib121d6c52601488647fd16dfd4f49bb4492c7a2f
2019-07-26 15:59:35 -07:00
Ghanshyam Mann
02cfb6c027 Add integrated gate tempest and grenade job
Swift gate does not run integrated-gate jobs which are
tempest-full and grenade-py3 job. Tempest-full job run
all services tests. But all services tests are not needed
to run on swift gate because it does not depends on all services.

Tempest has prepared the new jobs for swift gate which will run
only Swift, Cinder and Glance related tests.

New template 'integrated-gate-object-storage'(Depends-On) includes
the tempest-integrated-object-storage and grenade-py3 jobs

This commit adds the new integrated-gate template in swift gate.

Depends-On: https://review.opendev.org/#/c/670353/
Change-Id: Ia0543dca729c3a2aa67ce9f560c1ce5976c00abf
2019-07-26 12:19:21 -07:00
Andreas Jaeger
097a62cad3 Fix broken API-ref link
The URL is object-store, not object-storage. Fix one occurence.

Change-Id: I08ed3b19cbe0024fd67a6fb7a7a6db0d9084976b
2019-07-26 11:49:15 +02:00
Tim Burke
71f83963c2 py3: fix non-ascii metadata handling in account-server
Previously, we were storing the WSGI-style UTF-8-bytes-decoded-as-Latin-1
strings in the JSON field, and sending them back to eventlet directly.
If running in a mixed py2/py3 cluster, replication would eventually get
that back to the py2 server, and worse, the native-string version would
get back to the py3 server! Then on GET or HEAD, eventlet would barf
if any characters were outside the Latin-1 range.

Closes-Bug: #1837805
Change-Id: I31d942e72fd7bfbb1db4dbb1dd522dff69969e5d
2019-07-25 14:16:56 -07:00
Tim Burke
60c27d3aef py3: Fix title-casing in HeaderKeyDict
Change-Id: I1152c47c52f6482ec877142c96845b00bf6dcc5b
Related-Change: I130ba5014b7eff458d87ab29eb42fe45607c9a12
2019-07-25 12:55:03 -07:00
Zuul
d6e790d1b7 Merge "Fix up errno checking" 2019-07-24 13:16:13 +00:00
Zuul
7567ad819d Merge "Make rolling-upgrade job voting again" 2019-07-24 00:48:11 +00:00
Zuul
4656077dcf Merge "Add Python 3 Train unit tests" 2019-07-23 17:53:43 +00:00
Zuul
6a513499ae Merge "Bump up our minimum eventlet version" 2019-07-23 17:53:40 +00:00
Zuul
3953294ea7 Merge "Make py36 job voting" 2019-07-23 17:53:38 +00:00