4764 Commits

Author SHA1 Message Date
Zuul
119fd25ca5 Merge "s3api: Check whether versioning is enabled more" 2020-06-06 04:18:26 +00:00
Zuul
c2b03f6779 Merge "Latch shard-stat reporting" 2020-06-06 04:01:26 +00:00
Zuul
713f056493 Merge "Quiet eventlet exceptions in test" 2020-06-06 03:31:35 +00:00
Zuul
00b9ee2538 Merge "Don't auto-create shard containers" 2020-06-06 02:21:10 +00:00
Zuul
ba01f93ad9 Merge "func tests: work with etag-quoter on by default" 2020-06-05 20:52:30 +00:00
Clay Gerrard
fc731198ac Quiet eventlet exceptions in test
This traceback would probably show up in the wild, but it's not relevant
to this test.

Change-Id: I9e6e7679f674bddddcc4440b38d5741aaece3393
2020-06-05 09:49:01 -05:00
Zuul
56278100a1 Merge "relinker: Improve performance by limiting I/O" 2020-06-05 06:09:24 +00:00
Tim Burke
ce4c0fb14b Don't auto-create shard containers
...unless the client requests it specifically using a new flag:

   X-Backend-Auto-Create: true

Previously, you could get real jittery listings during a rebalance:

 * Partition with a shard DB get reassigned, so one primary has no DB.
 * Proxy makes a listing, gets a 404, tries another node. Likely, one of
   the other shard replicas responds. Things are fine.
 * Update comes in. Since we use the auto_create_account_prefix
   namespace for shards, container DB gets created and we write the row.
 * Proxy makes another listing. There's a one-in-three chance that we
   claim there's only one object in that whole range.

Note that unsharded databases would respond to the update with a 404 and
wait for one of the other primaries (or the old primary that's now a
hand-off) to rsync a whole DB over, keeping us in the happy state.

Now, if the account is in the shards namespace, 404 the object update if
we have no DB. Wait for replication like in the unsharded case.

Continue to be willing to create the DB when the sharder is seeding all
the CREATED databases before it starts cleaving, though.

Change-Id: I15052f3f17999e6f432951ba7c0731dcdc9475bb
Closes-Bug: #1881210
2020-06-03 13:26:31 -07:00
Zuul
45a9ca39a4 Merge "Enable s3api and staticweb tests across all func tests" 2020-06-02 22:25:15 +00:00
Zuul
b26d208b61 Merge "Simplify wsgify()" 2020-06-02 19:53:58 +00:00
Thiago da Silva
20c6bdb71c Enable s3api and staticweb tests across all func tests
This patch removed the separate s3api, staticweb functional tests
gate jobs and added them across all other functional test jobs.

Change-Id: Ie1c606132a054defc2b3cc14a66031090e7b8449
2020-06-01 19:16:48 -07:00
Tim Burke
99947150dd func tests: work with etag-quoter on by default
Also, run the in-process encryption func tests like that.

Change-Id: I984ab8d1304d23b89589973950b10dda4aea0db3
2020-06-01 18:38:23 -05:00
Zuul
6c1bc3949d Merge "ratelimit: Allow multiple placements" 2020-06-01 21:25:41 +00:00
Clay Gerrard
ede9dad9f6 Better functest quarantine cleanup
Change-Id: I9218aaeb5fcd21f1bc2a5d655e3216059a209aeb
2020-06-01 14:43:05 +00:00
Tim Burke
cedec8c5ef Latch shard-stat reporting
The idea is, if none of

  - timestamp,
  - object_count,
  - bytes_used,
  - state, or
  - epoch

has changed, we shouldn't need to send an update back to the root
container.

This is more-or-less comparable to what the container-updater does to
avoid unnecessary writes to the account.

Closes-Bug: #1834097
Change-Id: I1ee7ba5eae3c508064714c4deb4f7c6bbbfa32af
2020-05-29 22:33:10 -07:00
Zuul
8f1a40eaae Merge "swift-dsvm: Enable s3api" 2020-05-28 00:27:36 +00:00
Tim Burke
fa768b4342 Simplify wsgify()
Change-Id: Iec399aa8b58e72152a17265f2af1131f02667131
2020-05-27 03:19:13 +00:00
Zuul
5d9c373618 Merge "versioning: Have versioning symlinks make pre-auth requests to reserved container" 2020-05-27 00:15:58 +00:00
Zuul
7b6546b076 Merge "fix s3api functional tests" 2020-05-26 20:36:06 +00:00
Zuul
22719f0d0d Merge "Breakup reclaim into batches" 2020-05-26 20:36:03 +00:00
Tim Burke
a8e03f42e0 versioning: Have versioning symlinks make pre-auth requests to reserved container
Previously, the lack of container ACLs on the reserved container would
mean that attempting to grant access to the user-visible container would
not work; the user could not access the backing object.

Now, have symlinks with the allow-reserved-names sysmeta set be
pre-authed. Note that the user still has to be authorized to read the
symlink, and if the backing object was *itself* a symlink, that will be
authed separately.

Change-Id: Ifd744044421ef2ca917ce9502b155a6514ce8ecf
Closes-Bug: #1880013
2020-05-26 10:09:56 -05:00
Clay Gerrard
63e02fa9fa Test for Versioned Object If-Match
Regular objects can do conditional requests, versioned objects should be
able to as well.

Change-Id: If69dbf2a4c876fa4b830f6d8652f22f39ceaf549
2020-05-26 13:49:15 +00:00
Tim Burke
bb9b0326fd swift-dsvm: Enable s3api
Depends-On: https://review.opendev.org/#/c/571021/
Change-Id: I3ac3288cd61b745ce7dbf2bded8eade026d0418f
2020-05-22 16:04:52 -07:00
Clay Gerrard
aab45880f8 Breakup reclaim into batches
We want to do the table scan without locking and group the locking
deletes into small indexed operations to minimize the impact of
background processes calling reclaim each cycle.

Change-Id: I3ccd145c14a9b68ff8a9da61f79034549c9bc127
Co-Authored-By: Tim Burke <tim.burke@gmail.com>
Closes-Bug: #1877651
2020-05-22 21:15:57 +00:00
Tim Burke
1db11df4f2 ratelimit: Allow multiple placements
We usually want to have ratelimit fairly far left in the pipeline -- the
assumption is that something like an auth check will be fairly expensive
and we should try to shield the auth system so it doesn't melt under the
load of a misbehaved swift client.

But with S3 requests, we can't know the account/container that a request
is destined for until *after* auth. Fortunately, we've already got some
code to make s3api play well with ratelimit.

So, let's have our cake and eat it, too: allow operators to place
ratelimit once, before auth, for swift requests and again, after auth,
for s3api. They'll both use the same memcached keys (so users can't
switch APIs to effectively double their limit), but still only have each
S3 request counted against the limit once.

Change-Id: If003bb43f39427fe47a0f5a01dbcc19e1b3b67ef
2020-05-19 11:10:22 -07:00
Thiago da Silva
f4bc951508 fix s3api functional tests
Connection was hard coded to use saio config

Change-Id: I9c11162de89fa3aa2a78aea093b187d0309860f5
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2020-05-15 22:38:04 -07:00
Zuul
08db36a295 Merge "py27: Suppress UnicodeWarnings in ShardRange setters" 2020-05-13 17:44:56 +00:00
Tim Burke
0fd23ee546 Fix pep8 job
New flake8 came out with new & improved rules. Ignore E741; it would be
too much churn. Fix the rest.

Change-Id: I9125c8c53423232309a75cbcc5b695b378864c1b
2020-05-13 00:24:13 -07:00
Zuul
a792255e79 Merge "swift-dsvm: Enable more middlewares" 2020-05-06 19:37:13 +00:00
Tim Burke
fe74ec0489 py27: Suppress UnicodeWarnings in ShardRange setters
Previously, we'd see warnings like

   UnicodeWarning: Unicode equal comparison failed to convert both
   arguments to Unicode - interpreting them as being unequal

when setting lower/upper bounds with non-ascii byte strings.

Change-Id: I328f297a5403d7e59db95bc726428a3f92df88e1
2020-05-04 21:39:28 -07:00
Zuul
948289151b Merge "probe tests: Work when fronted by a TLS terminator" 2020-05-05 00:45:51 +00:00
Tim Burke
630c9ef809 probe tests: Work when fronted by a TLS terminator
* Add a new config option, proxy_base_url
* Support HTTPS as well as HTTP connections
* Monkey-patch eventlet early so we never import an unpatched version
  from swiftclient

Change-Id: I4945d512966d3666f2738058f15a916c65ad4a6b
2020-05-04 10:54:01 -07:00
Zuul
8ae1855072 Merge "Use separate name for HeaderKeyDict var vs list of response headers" 2020-05-04 16:26:13 +00:00
Zuul
207e08c64b Merge "sharding: Add probe test that exercises swift-manage-shard-ranges" 2020-04-29 22:18:18 +00:00
Tim Burke
4c8512afb1 Use separate name for HeaderKeyDict var vs list of response headers
Closes-Bug: #1875538
Change-Id: I1bcef61157594329f6978f7380bf7293aa1ca65e
Related-Change: Ia832e9bab13167948f01bc50aa8a61974ce189fb
2020-04-28 07:48:27 -07:00
Tim Burke
1af995f0e8 s3api: Check whether versioning is enabled more
Previously, attempting to GET, HEAD, or DELETE an object with a non-null
version-id would cause 500s, with logs complaining about how

    version-aware operations require that the container is versioned

Now, we'll early-return with a 404 (on GET or HEAD) or 204 (on DELETE).

Change-Id: I46bfd4ae7d49657a94734962c087f350e758fead
Closes-Bug: 1874295
2020-04-27 21:19:17 -07:00
Zuul
c83d42f790 Merge "obj: _finalize_durable may succeed even when data file is missing" 2020-04-27 23:26:04 +00:00
Tim Burke
69b8165cd8 obj: _finalize_durable may succeed even when data file is missing
Ordinarily, an ENOENT in _finalize_durable should mean something's gone
off the rails -- we expected to be able to mark data durable, but
couldn't!

If there are concurrent writers, though, it might actually be OK:

   Client A writes .data
   Client B writes .data
   Client B finalizes .data *and cleans up on-disk files*
   Client A tries to finalize but .data is gone

Previously, the above would cause the object server to 500, and if
enough of them did this, the client may see a 503. Now, call it good so
clients get 201s.

Change-Id: I4e322a7be23870a62aaa6acee8435598a056c544
Closes-Bug: #1719860
2020-04-24 15:39:37 -07:00
Tim Burke
9581254e66 swift-dsvm: Enable more middlewares
Change-Id: I3cbbcd2ea9ced0923bee4a6b0783e4cf5e82e95b
2020-04-23 13:46:16 -07:00
Zuul
4c49009378 Merge "func tests: Allow test_etag_quoter to be run multiple times" 2020-04-23 01:28:49 +00:00
Tim Burke
72a6177520 func tests: Allow test_etag_quoter to be run multiple times
Change-Id: Ifb1d091e58b9331b027edf981f6af5c015b56936
2020-04-20 21:19:45 -07:00
Tim Burke
d0f0d1d4f3 sharding: Add probe test that exercises swift-manage-shard-ranges
Change-Id: Ic7c40589679c290e5565f9581f70b9a1c070f6ab
2020-04-20 18:46:31 -07:00
Tim Burke
eae27412d2 sharding: Don't inject shard ranges when user says quit
When an operator does a `find_and_replace` on a DB that already has
shard ranges, they get a prompt like:

   This will delete existing 58 shard ranges.
   Do you want to show the existing ranges [s], delete the existing
   ranges [yes] or quit without deleting [q]?

Previously, if they selected `q`, we would skip the delete but still do
the merge (!) and immediately warn about how there are now invalid shard
ranges. Now, quit without merging.

Change-Id: I7d869b137a6fbade59bb8ba16e4f3e9663e18822
2020-04-18 00:46:00 +00:00
Zuul
a495f1e327 Merge "pep8: Turn on E305" 2020-04-10 11:55:07 +00:00
Zuul
2b7e80217d Merge "Allow clients to send quoted ETags for static links" 2020-04-10 00:18:59 +00:00
Zuul
3cceec2ee5 Merge "Update hacking for Python3" 2020-04-09 15:05:28 +00:00
Zuul
7a6357fdbb Merge "s3api: Propagate backend PATH_INFO in environ for other middleware" 2020-04-09 02:16:33 +00:00
Romain de Joux
415011e162 s3api: Propagate backend PATH_INFO in environ for other middleware
Use swift.backend_path entry in wsgi environment to propagate
backend PATH_INFO.

Needed by ceilometermiddleware to extract account/container info
from PATH_INFO, patch: https://review.opendev.org/#/c/718085/

Change-Id: Ifb3c6c30835d912c5ba4b2e03f2e0b5cb392671a
2020-04-08 11:55:54 +02:00
Zuul
62fc62bb12 Merge "py3: stop barfing on message/rfc822 Content-Types" 2020-04-07 08:59:05 +00:00
Zuul
7158adfb22 Merge "Replace all "with Chunk*Timeout" by a watchdog" 2020-04-04 07:53:26 +00:00