88238108f824e14fca8ca6adb3ec0e72df87fdf9
5824 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
Andy McCrae
|
efdf123a40 |
[Docs] Document prevention of disk full scenarios
Adds section to detail how to prevent disk full scenarios from occurring. Change-Id: Iafb4a47fa4892f6067252f3a80de87cd76506a40 |
||
|
Jenkins
|
9314c38395 | Merge "Clean up fallocate tests a little" | ||
|
Jenkins
|
8bd4312900 | Merge "Import BrainSpliter directly in expirer probe" | ||
|
venkatamahesh
|
4248123169 |
Remove the invalid project link
swiftsync project is no longer maintained and so is removed from the list Change-Id: Ieae67c728da16e5516babd33d2e5937b14738d6a Closes-Bug: #1581975 |
||
|
Brian Ober
|
1adc6047f0 |
Bypass Account Mgmt Functional Cases When Disabled
The testPUT case is failing when keystone was enabled and allow_account_management is set to True. There were a few issues needing addressed. First the case was renamed to call out what it was actually doing which is verifying an error scenario for which a PUT on a storage account was not allowed. Second the case was running even when allow_account_management is enabled, which is incorrect. It "accidently" works with TempAuth because it requires a reseller permission, so the Keystone failure here has more to do with not requiring a reseller permission to do a PUT on a storage account for which a user has an operator role on. The common sense fix here is to not execute this test case when allow_account_management is enabled. Change-Id: Id29f5ca48f92cd139535be7064107b8a61b02856 |
||
|
Samuel Merritt
|
1c88d2cb81 |
Fix up get_account_info and get_container_info
get_account_info used to work like this: * make an account HEAD request * ignore the response * get the account info by digging around in the request environment, where it had been deposited by elves or something Not actually elves, but the proxy's GETorHEAD_base method would take the HEAD response and cache it in the response environment, which was the same object as the request environment, thus enabling get_account_info to find it. This was extraordinarily brittle. If a WSGI middleware were to shallow-copy the request environment, then any middlewares to its left could not use get_account_info, as the left middleware's request environment would no longer be identical to the response environment down in GETorHEAD_base. Now, get_account_info works like this: * make an account HEAD request. * if the account info is in the request environment, return it. This is an optimization to avoid a double-set in memcached. * else, compute the account info from the response headers, store it in caches, and return it. This is much easier to think about; get_account_info can get and cache account info all on its own; the cache check and cache set are right next to each other. All the above is true for get_container_info as well. get_info() is still around, but it's just a shim. It was trying to unify get_account_info and get_container_info to exploit the commonalities, but the number of times that "if container:" showed up in get_info and its helpers really indicated that something was wrong. I'd rather have two functions with some duplication than one function with no duplication but a bunch of "if container:" branches. Other things of note: * a HEAD request to a deleted account returns 410, but get_account_info would return 404 since the 410 came from the account controller *after* GETorHEAD_base ran. Now get_account_info returns 410 as well. * cache validity period (recheck_account_existence and recheck_container_existence) is now communicated to get_account_info via an X-Backend header. This way, get_account_info doesn't need a reference to the swift.proxy.server.Application object. * both logged swift_source values are now correct for get_container_info calls; before, on a cold cache, get_container_info would call get_account_info but not pass along swift_source, resulting in get_account_info logging "GET_INFO" as the source. Amusingly, there was a unit test asserting this bogus behavior. * callers that modify the return value of get_account_info or of get_container_info don't modify what's stored in swift.infocache. * get_account_info on an account that *can* be autocreated but has not been will return a 200, same as a HEAD request. The old behavior was a 404 from get_account_info but a 200 from HEAD. Callers can tell the difference by looking at info['account_really_exists'] if they need to know the difference (there is one call site that needs to know, in container PUT). Note: this is for all accounts when the proxy's "account_autocreate" setting is on. Change-Id: I5167714025ec7237f7e6dd4759c2c6eb959b3fca |
||
|
Samuel Merritt
|
ce90a1e79e |
Make info caching work across subrequests
Previously, if you called get_account_info, get_container_info, or get_object_info, then the results of that call would be cached in the WSGI environment as top-level keys. This is okay, except that if you, in middleware, copy the WSGI environment and then make a subrequest using the copy, information retrieved in the subrequest is cached only in the copy and not in the original. This can mean lots of extra trips to memcache for, say, SLO validation where the segments are in another container; the object HEAD ends up getting container info for the segment container, but then the next object HEAD gets it again. This commit moves the cache for get_*_info into a dictionary at environ['swift.infocache']; this way, you can shallow-copy the request environment and still get the benefits from the cache. Change-Id: I3481b38b41c33cd1e39e19baab56193c5f9bf6ac |
||
|
Jenkins
|
bd4cb4490f | Merge "Skip SLO-reconciling probe test when SLO is off" | ||
|
Samuel Merritt
|
30e39cc9fa |
Skip SLO-reconciling probe test when SLO is off
The probe test in question tries to make a manifest referencing unavailable objects and expects that to fail with a 400. If the SLO middleware is enabled, then it checks the segments, can't find some, and returns the 400. If it's disabled, the PUT succeeds and makes an object whose contents are some JSON blob. In the latter case, the probe test would fail because it expected a real SLO manifest but didn't find one. Now we skip the remainder of the test when we detect that SLO is not enabled. Change-Id: I3e7e8e98107608e675efc24156e703bc167458bb |
||
|
Jenkins
|
ae57129918 | Merge "Put back missing sysmeta unit tests" | ||
|
Jenkins
|
16bd478816 | Merge "Fix bug expirer unexpectedly deletes object created after x-delete-at" | ||
|
Kota Tsuyuzaki
|
721c788b9a |
Import BrainSpliter directly in expirer probe
Change-Id: Ib3cfe38d1b17c09c7248b5cbcfe4e2eadff7acd9 |
||
|
Jenkins
|
1c6e3e9e87 | Merge "List system dependencies for running common tests" | ||
|
Jenkins
|
b3ddcd07d2 | Merge "Tighten up ResumingGetter.fast_forward" | ||
|
Jenkins
|
01ec0d32f0 | Merge "Fix download resumption after getting no data." | ||
|
Jenkins
|
fc7c515fe0 | Merge "fix docs word usage for large obj copy" | ||
|
Jenkins
|
4c5b62b07b | Merge "Stop complaining about auditor_status files" | ||
|
Jenkins
|
f97bda93a0 | Merge "README: fix broken link" | ||
|
Paul Dardeau
|
eda1b330f3 |
fix docs word usage for large obj copy
Change-Id: I2b6ca3f9277b344ff5b05a85304084a7edcbcb66 |
||
|
Jenkins
|
9e5279a5e9 | Merge "Don't delete misplaced dbs if not replicated" | ||
|
Samuel Merritt
|
6834547f66 |
Clean up fallocate tests a little
Change-Id: I01f1ad8ef0f8910718fd2fb30c9e8285358baf84 |
||
|
Alistair Coles
|
b430c384db |
Put back missing sysmeta unit tests
We lost some unit tests from test_sysmeta.py in [1].
This patch restores them. Since the proxy no longer
implements post-as-copy or COPY then we need to plumb
in a copy middleware to the test app in test_sysmeta.
It is a little odd perhaps to have these tests under
test/unit/proxy but the alternative is to duplicate
the test setup and base test code that already exists
in test_sysmeta.py into test_copy.py.
[1] commit
|
||
|
Saverio Proto
|
ce022f4417 |
README: fix broken link
There is a broken link to CONTRIBUTING.rst
introduced in commit
|
||
|
Jenkins
|
177e531a2e | Merge "Remove unneeded setting of SO_REUSEADDR." | ||
|
Jenkins
|
a403faadd4 | Merge "Allow fallocate_reserve to be a percentage" | ||
|
Christian Schwede
|
9729bc83eb |
Don't delete misplaced dbs if not replicated
If one uses only a single replica and a database file is placed on a wrong partition, it will be removed instead of replicated to the correct partition. There are two reasons for this: 1. The list of nodes is empty when there is only a single replica 2. all(responses) is True even if there is no response at all, and the latter is always True if there is no node to replicate to. This patch fixes this by adding a special case if used with only one replica to the node selection loop and ensures that the list of responses is not empty. Also adds a test that fails on current master and passes with this change. Closes-Bug: 1568591 Change-Id: I028ea8c1928e8c9a401db31fb266ff82606f8371 |
||
|
Andreas Jaeger
|
92274d4790 |
List system dependencies for running common tests
Add an other-requirements.txt file containing a cross-platform list of dependencies needed for running included tox-based tests. Also include a tox environment for convenience calling the bindep[*] utility to list any missing system requirements. Document bindep and other-requirements usage. This change is self-testing. For other-requirements.txt see also http://docs.openstack.org/infra/manual/drivers.html#package-requirements [*] http://docs.openstack.org/infra/bindep/ Change-Id: Iea6f5fecba3b7cb9f6dac7029c0f17fc31fc0e3c |
||
|
Tim Burke
|
ad16e2c77b |
Stop complaining about auditor_status files
Following
|
||
|
Jenkins
|
b6c3ab26a1 | Merge "Refactor server side copy as middleware" | ||
|
Jenkins
|
ffef6105cd | Merge "Rename hash_cleanup_listdir tests" | ||
|
Jenkins
|
0444aad6ee | Merge "Fix probe tests from commit cf48e75" | ||
|
Prashanth Pai
|
46d61a4dcd |
Refactor server side copy as middleware
Rewrite server side copy and 'object post as copy' feature as middleware to simplify the PUT method in the object controller code. COPY is no longer a verb implemented as public method in Proxy application. The server side copy middleware is inserted to the left of dlo, slo and versioned_writes middlewares in the proxy server pipeline. As a result, dlo and slo copy_hooks are no longer required. SLO manifests are now validated when copied so when copying a manifest to another account the referenced segments must be readable in that account for the manifest copy to succeed (previously this validation was not made, meaning the manifest was copied but could be unusable if the segments were not readable). With this change, there should be no change in functionality or existing behavior. This is asserted with (almost) no changes required to existing functional tests. Some notes (for operators): * Middleware required to be auto-inserted before slo and dlo and versioned_writes * Turning off server side copy is not configurable. * object_post_as_copy is no longer a configurable option of proxy server but of this middleware. However, for smooth upgrade, config option set in proxy server app is also read. DocImpact: Introducing server side copy as middleware Co-Authored-By: Alistair Coles <alistair.coles@hpe.com> Co-Authored-By: Thiago da Silva <thiago@redhat.com> Change-Id: Ic96a92e938589a2f6add35a40741fd062f1c29eb Signed-off-by: Prashanth Pai <ppai@redhat.com> Signed-off-by: Thiago da Silva <thiago@redhat.com> |
||
|
Jenkins
|
6fbf262e8f | Merge "resurrect gholt blog posts on building consistent hashing ring" | ||
|
Jenkins
|
f66898ae00 | Merge "Remove ThreadPool class" | ||
|
Jenkins
|
6a88f27eb0 | Merge "Remove threads_per_disk setting" | ||
|
Paul Dardeau
|
cb8cda6588 |
resurrect gholt blog posts on building consistent hashing ring
These are blog posts authored by Greg Holt (gholt) and used with permission to add here. Content was only reformatted as rst and wrap prose lines at 70 characters. Change-Id: I7aa47c24b5019aa598ee005e01612a49514da25f |
||
|
Jenkins
|
7429da0ddb | Merge "SwiftLogFormatter will log transaction IDs on INFO level" | ||
|
Alistair Coles
|
ba1a568f81 |
Rename hash_cleanup_listdir tests
hash_cleanup_listdir was removed in [1], this patch renames all references to it in test_diskfile to refer to the cleanup_ondisk_files method that is now tested directly. Also remove the final references to the now non-existent function in a few comments. [1] I0b96dfde32b4c666eebda6e88228516dd693ef92 Change-Id: I1e151799fc2774de9a1af092afff875af24a630c Related-Bug: #1550569 |
||
|
Jenkins
|
d6a9d0a8bd | Merge "Reclaim isolated .meta files" | ||
|
Jenkins
|
aa1a0cf4b4 | Merge "Use smaller quorum size in proxy for even numbers of replicas" | ||
|
John Dickinson
|
6827affe62 |
Rework the contributor docs
This started as a new "new_contributor" doc. But we've already got at least 3 different docs like that. Change-Id: Ia2303ab55eeea01cc71acbccaeab55dad0ef5ff9 |
||
|
Samuel Merritt
|
deaef2f9d6 |
Remove unneeded setting of SO_REUSEADDR.
This has been in eventlet.listen() since version 0.15. Change-Id: Ib77b28231a2180f1ea082f356c4687c39681a6f7 |
||
|
Christopher Bartz
|
b3dd6a5df1 |
Improves log message in swift.obj.replicator
Before this commit, when a local device has not found been found in a object-replication run, the policy was not mentioned in the error log. But it is of interest to know the policy, for example for error searching, when no local device has been found. Change-Id: Icb9f9f1d4aec5c4a70dd8abdf5483d4816720418 |
||
|
Samuel Merritt
|
99305b9300 |
Fix probe tests from commit cf48e75
Commit
|
||
|
Jenkins
|
2bf5eb775f | Merge "change default ports for servers" | ||
|
Jenkins
|
39423813e9 | Merge "Fix minor typos in review guidelines" | ||
|
Shashirekha Gundur
|
cf48e75c25 |
change default ports for servers
Changing the recommended ports for Swift services from ports 6000-6002 to unused ports 6200-6202; so they do not conflict with X-Windows or other services. Updated SAIO docs. DocImpact Closes-Bug: #1521339 Change-Id: Ie1c778b159792c8e259e2a54cb86051686ac9d18 |
||
|
Christian Schwede
|
4c11833a9c |
Remove ThreadPool class
With the removement of threads_per_disk there is no longer a need to use run_in_thread() at all; it was just calling the function itself when running with 0 threads. Similar to force_run_in_thread() - with 0 threads it was basically doing the same like in tpool_reraise(), therefore replacing the call and finally removing the complete ThreadPool class. Note that this might break external consumers that are inheriting BaseDiskFileManager; in this case you need to adopt this change in your codebase then. Change-Id: I39489dd660935bdbfbc26b92af86814369369fb5 |
||
|
Jenkins
|
ae2b86129e | Merge "[Trivial] Remove unnecessary executable privilege" | ||
|
Bryan Keller
|
33fdd0a356 |
SwiftLogFormatter will log transaction IDs on INFO level
Previously SwiftLogFormatter would make two checks. One to see if the transaction id was already in the message field and another check to make sure the log level wasn't set to info. If either of these was true, then it would not log the transaction ID in the transaction ID field. This commit removes the check for the info log. Now transaction IDs will be recorded in all cases that have them. Change-Id: Ic06538ab55a75d298169ae1745671573ee9c09e8 Closes-Bug: #1504344 |