dd8b7656daad1c244c94aa6d2bc8b4eb59c8cb3b
5932 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
Tim Burke
|
dd8b7656da |
Skip boto 2.x tests if boto is not installed
The boto library was last updated two years ago and has rusted to the point that it's unusable on py312 -- see https://github.com/boto/boto/issues/3951 We should transition all of these tests to boto3 equivalents, but this should help out in the meantime. Related-Bug: #1557260 Related-Bug: #2063367 Change-Id: If95f45371f352c6a2d16be1a3e1b64e265bccfb4 |
||
|
Tim Burke
|
38d0b3fabc |
Clean up watchdog threads
This shouldn't impact real servers, as those processes were about to wrap up anyway. It *can* cause some confusing behaviors in tests, though. Change-Id: Ifd8a64efcd3fc983596ba7cd9fe28eb9663c93d6 |
||
|
Tim Burke
|
761d919677 |
tests: Use mock.patch more
Change-Id: I68974338f8e0284ed77960048a83f72855b93348 |
||
|
Tim Burke
|
b4dddb7406 |
tests: Use @with_tempdir more
Change-Id: I33e71f6c201bb4f2cf3481afd40cf489eb1fcd1f |
||
|
Zuul
|
0a3c46e6c4 | Merge "Refactor utils" | ||
|
Shreeya Deshpande
|
bc3a59bdd3 |
Refactor utils
- Move statsd client into it's own module - Move all logging functions into their own module - Move all config functions into their own module - Move all helper functions into their own module Partial-Bug: #2015274 Change-Id: Ic4b5005e3efffa8dba17d91a41e46d5c68533f9a |
||
|
Zuul
|
f7b9a72a6e | Merge "object-expirer: test for mix of async and delayed deletes" | ||
|
Zuul
|
b6c377e7e5 | Merge "support x-open-expired header for expired objects" | ||
|
Zuul
|
2e487ba695 | Merge "expirer: account and container level delay_reaping" | ||
|
Clay Gerrard
|
b490857b47 |
object-expirer: test for mix of async and delayed deletes
Related-Change: I106103438c4162a561486ac73a09436e998ae1f0 Change-Id: I95606aed5a5bd70424fbc51dd965f238fa7f064f |
||
|
indianwhocodes
|
11eb17d3b2 |
support x-open-expired header for expired objects
If the global configuration option 'enable_open_expired' is set to true in the config, then the client will be able to make a request with the header 'x-open-expired' set to true in order to access an object that has expired, provided it is in its grace period. If this config flag is set to false, the client will not be able to access any expired objects, even with the header, which is the default behavior unless the flag is set. When a client sets a 'x-open-expired' header to a true value for a GET/HEAD/POST request the proxy will forward x-backend-open-expired to storage server. The storage server will allow clients that set x-backend-open-expired to open and read an object that has not yet been reaped by the object-expirer, even after the x-delete-at time has passed. The header is always ignored when used with temporary URLs. Co-Authored-By: Anish Kachinthaya <akachinthaya@nvidia.com> Related-Change: I106103438c4162a561486ac73a09436e998ae1f0 Change-Id: Ibe7dde0e3bf587d77e14808b169c02f8fb3dddb3 |
||
|
Mandell Degerness
|
5961ba0ca7 |
expirer: account and container level delay_reaping
The object expirer can be configured to delay the reaping of objects from disk after their expiration time using account and container level delay_reaping values. The delay_reaping value of accounts and containers in seconds is configured in the object server config. The object expirer references these configured values to only reap objects from specified accounts and containers after their corresponding delays. The goal of the delay_reaping feature is to prevent accidental or premature data loss if an object marked for deletion with the 'x-delete-at' feature should not be reaped immediately, for whatever reason. Configuring the delay_reaping value at a granular account and container level is beneficial for being able to keep storage capacity consumption in control while maintaining a desired data recovery window. This patch also adds a sample configuration, documentation, and tests for bad configurations and grace period functionality. Co-Authored-By: Anish Kachinthaya <akachinthaya@nvidia.com> Change-Id: I106103438c4162a561486ac73a09436e998ae1f0 |
||
|
Alistair Coles
|
3d5a97f76b |
proxy_logging: unit test first-byte.timing metrics
Add some test assertions to cover the first-byte timing metrics introduced in the related change. Add ttfb param to log_request docstring. Change-Id: I530652dd672d7d4e5eac351ccbad318773414f7d Related-Change: I1611e34846e586703e9d3709fa64e8df41f2d685 |
||
|
Clay Gerrard
|
d4435e1229 |
proxy-logging: emit stats more consistently
Change-Id: I526bbcc59c9eb5923c3784d5d06bc38998cb48db |
||
|
Clay Gerrard
|
3c449e78e4 |
test: assert behavior of proxy_logging metrics
Change-Id: I651ddd40e9115a56727096d4a3aa84589146308f |
||
|
Zuul
|
0e5aeb5045 | Merge "s3api: Fix handling of non-ascii access keys" | ||
|
Zuul
|
cdc4f264d2 | Merge "recon-cron: Tolerate missing directories" | ||
|
Tim Burke
|
8424b02290 |
s3api: Fix handling of non-ascii access keys
We stuff the access key into the request path until we get back a more-authoritative account name from auth. But it needs to be a WSGI string when we do! Closes-Bug: #2058748 Change-Id: I34adb8141cc9e62d17a27f01c63f40d1dd25991c |
||
|
Tim Burke
|
f31b6f7353 |
recon-cron: Tolerate missing directories
Any of these directories may get unlinked between when we saw them in their parent's directory listing and when we go to descend. Change-Id: I1dfc0ee1d9e70cb0600557cde980bd5880bd40b3 |
||
|
Zuul
|
fd3997f027 | Merge "tests: Update CORS geckodriver" | ||
|
Tim Burke
|
af15ad53fb |
tests: Update CORS geckodriver
Change-Id: I5ab762dfe0f85e346c4868ec4540884ba5f0a7f4 |
||
|
Jianjian Huo
|
27ef11ea14 |
test: implement cache expiration time in MockMemcached
Change-Id: I16ec414f87ac1a5e1e87e7560290c5ef0ca4f7cf |
||
|
Zuul
|
b6dc24dbc0 | Merge "s3api test for zero byte mpu" | ||
|
Zuul
|
891d06345e | Merge "s3api: Support GET/HEAD request with ?partNumber" | ||
|
Zuul
|
60db1f847c | Merge "slo: part-number=N query parameter support" | ||
|
Clay Gerrard
|
d10351db30 |
s3api test for zero byte mpu
Change-Id: I89050cead3ef2d5f8ebfc9cb58f736f33b1c44fe |
||
|
indianwhocodes
|
46e7da97c6 |
s3api: Support GET/HEAD request with ?partNumber
Co-Authored-By: Alistair Coles <alistairncoles@gmail.com> Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com> Closes-Bug: #1735284 Change-Id: Ib396309c706fbc6bc419377fe23fcf5603a89f45 |
||
|
indianwhocodes
|
6adbeb4036 |
slo: part-number=N query parameter support
This change allows individual SLO segments to be downloaded by adding an extra 'part-number' query parameter to the GET request. You can also retrieve the Content-Length of an individual segment with a HEAD request. Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com> Co-Authored-By: Alistair Coles <alistairncoles@gmail.com> Change-Id: I7af0dc9898ca35f042b52dd5db000072f2c7512e |
||
|
Matthew Oliver
|
4135133a63 |
memcachering: change failed to yield log message
Currently when the memcachering `_get_conns` method runs out of memcached servers to try and so fails to yield anything we log a: All memcached servers error-limited However, this error message isn't entirely accurate. It can also fail because it failed to connect all it's memcached servers not just because they're error limited. You can disable error-limiting of memcached servers. So in this case this error message is a red-herring. Downstream we use a mcrouter client on each node which itself talks to a bunch of memcache servers. Therefore in swift's memcachering client we only configure the 1 mcrouter client as a single server in the ring. Because of this we disable memcached error-limiting. If the node gets too overloaded we've had timeouts talking to the local mcrouter client. This fires off error-limitted log messages which can confuse things. Because it's possible to turn off error-limiting, the log line isn't quite adequate anymore. So this patch changes it to: No more memcached servers to try Change-Id: I97fb4f3ee2ac45831aae14a782b2c6dc73e82d85 |
||
|
Zuul
|
3478803a95 | Merge "zero bytes manifests are not legacy" | ||
|
Zuul
|
e9cf2a31aa | Merge "tests: Clear txn id on init for all debug loggers" | ||
|
Zuul
|
0947e94f66 | Merge "staticweb: Work with prefix-based tempurls" | ||
|
Clay Gerrard
|
130188b6c0 |
zero bytes manifests are not legacy
Change-Id: I7c8adb129b8770eee501748a378f3adc42c8cd39 |
||
|
Zuul
|
4c5f41cc1f | Merge "Fix diskfile test failing on macOS" | ||
|
Tim Burke
|
1ee9b1e3ba |
tests: Clear txn id on init for all debug loggers
Since we fake out all the greenthread stuff to run in the main thread, we can (sometimes?) find that a transaction ID has already been set, leading to failures in test_bad_request_app_logging like AssertionError: b'X-Trans-Id: test-trans-id' not found in b'X-Trans-Id: tx...' By resetting the logger's txn_id, we're assured that our mock will be run and the expected transaction ID will be used. Change-Id: I465eed5372a2a5e591f80a09676f4b7f091cd444 |
||
|
Zuul
|
07c8e8bcdc | Merge "Object-server: add periodic greenthread yielding during file read." | ||
|
Jianjian Huo
|
d5877179a5 |
Object-server: add periodic greenthread yielding during file read.
Currently, when object-server serves GET request and DiskFile reader iterate over disk file chunks, there is no explicit eventlet sleep called. When network outpace the slow disk IO, it's possible one large and slow GET request could cause eventlet hub not to schedule any other green threads for a long period of time. To improve this, this patch add a configurable sleep parameter into DiskFile reader, which is 'cooperative_period' with a default value of 0 (disabled). Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com> Change-Id: I80b04bad0601b6cd6caef35498f89d4ba70a4fd4 |
||
|
Alistair Coles
|
2da150b890 |
Fix diskfile test failing on macOS
The existing test fails on macOS because the value of errno.ENODATA is platform dependent. On macOS ENODATA is 96: % man 2 intro|grep ENODATA 96 ENODATA No message available. Change-Id: Ibc760e641d4351ed771f2321dba27dc4e5b367c1 |
||
|
Alistair Coles
|
2500fbeea9 |
proxy: don't use recoverable_node_timeout with x-newest
Object GET requests with a truthy X-Newest header are not resumed if a backend request times out. The GetOrHeadHandler therefore uses the regular node_timeout when waiting for a backend connection response, rather than the possibly shorter recoverable_node_timeout. However, previously while reading data from a backend response the recoverable_node_timeout would still be used with X-Newest requests. This patch simplifies GetOrHeadHandler to never use recoverable_node_timeout when X-Newest is truthy. Change-Id: I326278ecb21465f519b281c9f6c2dedbcbb5ff14 |
||
|
Alistair Coles
|
8061dfb1c3 |
proxy-server: de-duplicate _get_next_response_part method
Both GetOrHeadHandler (used for replicated policy GETs) and ECFragGetter (used for EC policy GETs) have _get_next_response_part methods that are very similar. This patch replaces them with a single method in the common GetterBase superclass. Both classes are modified to use *only* the Request instance passed to their constructors. Previously their entry methods (GetOrHeadHandler.get_working_response and ECFragGetter.response_parts_iter) accepted a Request instance as an arg and the class then variably referred to that or the Request instance passed to the constructor. Both instances must be the same and it is therefore safer to only allow the Request to be passed to the constructor. The 'newest' keyword arg is dropped from the GetOrHeadHandler constructor because it is never used. This refactoring patch makes no intentional behavioral changes, apart from the text of some error log messages which have been changed to differentiate replicated object GETs from EC fragment GETs. Change-Id: I148e158ab046929d188289796abfbbce97dc8d90 |
||
|
Zuul
|
50336c5098 | Merge "test: all primary error limit is error" | ||
|
Zuul
|
439dc93cc4 | Merge "Add ClosingIterator class; be more explicit about closes" | ||
|
Clay Gerrard
|
89dd515310 |
test: all primary error limit is error
Change-Id: Ib790be26a2b990f313484f9ebdc99b8dc14613c9 |
||
|
Zuul
|
3aba22fde5 | Merge "Stop using deprecated datetime.utc* functions" | ||
|
Tim Burke
|
c522f5676e |
Add ClosingIterator class; be more explicit about closes
... in document_iters_to_http_response_body. We seemed to be relying a little too heavily upon prompt garbage collection to log client disconnects, leading to failures in test_base.py::TestGetOrHeadHandler::test_disconnected_logging under python 3.12. Closes-Bug: #2046352 Co-Authored-By: Alistair Coles <alistairncoles@gmail.com> Change-Id: I4479d2690f708312270eb92759789ddce7f7f930 |
||
|
Zuul
|
51ae9b00c9 | Merge "lint: Consistently use assertIsInstance" | ||
|
Zuul
|
ad41371005 | Merge "lint: Up-rev hacking" | ||
|
Zuul
|
93d654024a | Merge "diskfile: Ignore invalid suffixes in invalidations file" | ||
|
Zuul
|
4d3f9fe952 | Merge "sharding: don't replace own_shard_range without an epoch" | ||
|
Tim Burke
|
ce9e56a6d1 |
lint: Consistently use assertIsInstance
This has been available since py32 and was backported to py27; there is no point in us continuing to carry the old idiom forward. Change-Id: I21f64b8b2970e2dd5f56836f7f513e7895a5dc88 |