c8da8676fdda47b66aa8dda6576b9311be6f57eb
696 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
Thiago da Silva
|
36dbd38e48 |
Add s3api headers to allowed_headers by default
Previously, these headers had to be added by operators to their object-server.conf when enabling swift3 middleware. Since s3api is now imported into swift we should go ahead and add these headers by default too. Change-Id: Ib82e175096716e42aecdab48f01f079e09da6a1d Signed-off-by: Thiago da Silva <thiago@redhat.com> |
||
|
Darrell Bishop
|
661838d968 |
Add support for PROXY protocol v1 (only)
...to the proxy-server. The point is to allow the Swift proxy server to log accurate client IP addresses when there is a proxy or SSL-terminator between the client and the Swift proxy server. Example servers supporting this PROXY protocol: stud (v1 only) stunnel haproxy hitch (v2 only) varnish See http://www.haproxy.org/download/1.7/doc/proxy-protocol.txt The feature is enabled by adding this to your proxy config file: [app:proxy-server] use = egg:swift#proxy ... require_proxy_protocol = true The protocol specification states: The receiver MUST be configured to only receive the protocol described in this specification and MUST not try to guess whether the protocol header is present or not. so valid deployments are: 1) require_proxy_protocol = false (or missing; default is false) and NOT behind a proxy that adds or proxies existing PROXY lines. 2) require_proxy_protocol = true and IS behind a proxy that adds or proxies existing PROXY lines. Specifically, in the default configuration, one cannot send the swift proxy PROXY lines (no change from before this patch). When this feature is enabled, one _must_ send PROXY lines. Change-Id: Icb88902f0a89b8d980c860be032d5e822845d03a |
||
|
Matthew Oliver
|
2641814010 |
Add sharder daemon, manage_shard_ranges tool and probe tests
The sharder daemon visits container dbs and when necessary executes the sharding workflow on the db. The workflow is, in overview: - perform an audit of the container for sharding purposes. - move any misplaced objects that do not belong in the container to their correct shard. - move shard ranges from FOUND state to CREATED state by creating shard containers. - move shard ranges from CREATED to CLEAVED state by cleaving objects to shard dbs and replicating those dbs. By default this is done in batches of 2 shard ranges per visit. Additionally, when the auto_shard option is True (NOT yet recommeneded in production), the sharder will identify shard ranges for containers that have exceeded the threshold for sharding, and will also manage the sharding and shrinking of shard containers. The manage_shard_ranges tool provides a means to manually identify shard ranges and merge them to a container in order to trigger sharding. This is currently the recommended way to shard a container. Co-Authored-By: Alistair Coles <alistairncoles@gmail.com> Co-Authored-By: Tim Burke <tim.burke@gmail.com> Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com> Change-Id: I7f192209d4d5580f5a0aa6838f9f04e436cf6b1f |
||
|
Zuul
|
3313392462 | Merge "Import swift3 into swift repo as s3api middleware" | ||
|
Kota Tsuyuzaki
|
636b922f3b |
Import swift3 into swift repo as s3api middleware
This attempts to import openstack/swift3 package into swift upstream repository, namespace. This is almost simple porting except following items. 1. Rename swift3 namespace to swift.common.middleware.s3api 1.1 Rename also some conflicted class names (e.g. Request/Response) 2. Port unittests to test/unit/s3api dir to be able to run on the gate. 3. Port functests to test/functional/s3api and setup in-process testing 4. Port docs to doc dir, then address the namespace change. 5. Use get_logger() instead of global logger instance 6. Avoid global conf instance Ex. fix various minor issue on those steps (e.g. packages, dependencies, deprecated things) The details and patch references in the work on feature/s3api are listed at https://trello.com/b/ZloaZ23t/s3api (completed board) Note that, because this is just a porting, no new feature is developed since the last swift3 release, and in the future work, Swift upstream may continue to work on remaining items for further improvements and the best compatibility of Amazon S3. Please read the new docs for your deployment and keep track to know what would be changed in the future releases. Change-Id: Ib803ea89cfee9a53c429606149159dd136c036fd Co-Authored-By: Thiago da Silva <thiago@redhat.com> Co-Authored-By: Tim Burke <tim.burke@gmail.com> |
||
|
Zuul
|
47efb5b969 | Merge "Multiprocess object replicator" | ||
|
Samuel Merritt
|
c28004deb0 |
Multiprocess object replicator
Add a multiprocess mode to the object replicator. Setting the "replicator_workers" setting to a positive value N will result in the replicator using up to N worker processes to perform replication tasks. At most one worker per disk will be spawned, so one can set replicator_workers=99999999 to always get one worker per disk regardless of the number of disks in each node. This is the same behavior that the object reconstructor has. Worker process logs will have a bit of information prepended so operators can tell which messages came from which worker. It looks like this: [worker 1/2 pid=16529] 154/154 (100.00%) partitions replicated in 1.02s (150.87/sec, 0s remaining) The prefix is "[worker M/N pid=P] ", where M is the worker's index, N is the total number of workers, and P is the process ID. Every message from the replicator's logger will have the prefix; this includes messages from down in diskfile, but does not include things printed to stdout or stderr. Drive-by fix: don't dump recon stats when replicating only certain policies. When running the object replicator with replicator_workers > 0 and "--policies=X,Y,Z", the replicator would update recon stats after running. Since it only ran on a subset of objects, it should not update recon, much like it doesn't update recon when run with --devices or --partitions. Change-Id: I6802a9ad9f1f9b9dafb99d8b095af0fdbf174dc5 |
||
|
wangqi
|
708b24aef1 |
Deprecate auth_uri option
Option auth_uri from group keystone_authtoken is deprecated[1]. Use option www_authenticate_uri from group keystone_authtoken. [1]https://review.openstack.org/#/c/508522/ Change-Id: I43bbc8b8c986e54a9a0829a0631d78d4077306f8 |
||
|
melissaml
|
3bc267d10c |
fix a typo in documentation
Change-Id: I0492ae1d50493585ead919904d6d9502b7738266 |
||
|
Samuel Merritt
|
47fed6f2f9 |
Add handoffs-only mode to DB replicators.
The object reconstructor has a handoffs-only mode that is very useful when a cluster requires rapid rebalancing, like when disks are nearing fullness. This mode's goal is to remove handoff partitions from disks without spending effort on primary partitions. The object replicator has a similar mode, though it varies in some details. This commit adds a handoffs-only mode to the account and container replicators. Change-Id: I588b151ee65ae49d204bd6bf58555504c15edf9f Closes-Bug: 1668399 |
||
|
Zuul
|
82844a3211 | Merge "Add support for data segments to SLO and SegmentedIterable" | ||
|
Zuul
|
bf172e2936 | Merge "tempurl: Make the digest algorithm configurable" | ||
|
Tim Burke
|
5a4d3bdfc4 |
tempurl: Make the digest algorithm configurable
... and add support for SHA-256 and SHA-512 by default. This allows us to start moving toward replacing SHA-1-based signatures. We've known this would eventually be necessary for a while [1], and earlier this year we've seen SHA-1 collisions [2]. Additionally, allow signatures to be base64-encoded, provided they start with a digest name followed by a colon. Trailing padding is optional for base64-encoded signatures, and both normal and "url-safe" modes are supported. For example, all of the following SHA-1 signatures are equivalent: da39a3ee5e6b4b0d3255bfef95601890afd80709 sha1:2jmj7l5rSw0yVb/vlWAYkK/YBwk= sha1:2jmj7l5rSw0yVb/vlWAYkK/YBwk sha1:2jmj7l5rSw0yVb_vlWAYkK_YBwk= sha1:2jmj7l5rSw0yVb_vlWAYkK_YBwk (Note that "normal" base64 encodings will require that you url encode all "+" characters as "%2B" so they aren't misinterpretted as spaces.) This was done for two reasons: 1. A hex-encoded SHA-512 is rather lengthy at 128 characters -- 88 isn't *that* much better, but it's something. 2. This will allow us to more-easily add support for different digests with the same bit length in the future. Base64-encoding is required for SHA-512 signatures; hex-encoding is supported for SHA-256 signatures so we aren't needlessly breaking from what Rackspace is doing. [1] https://www.schneier.com/blog/archives/2012/10/when_will_we_se.html [2] https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html Change-Id: Ia9dd1a91cc3c9c946f5f029cdefc9e66bcf01046 Related-Bug: #1733634 |
||
|
Joel Wright
|
11bf9e4588 |
Add support for data segments to SLO and SegmentedIterable
This patch updates the SLO middleware and SegmentedIterable to add support for user-specified inlined-data segments. Such segments will contain base64-encoded data to be added before/after an object-backed segment within an SLO. To accommodate the potential extra data we increase the default SLO maximum manifest size from 2MiB to 8MiB. The default maximum number of segments remains 1000, but this will only be enforced for object-backed segments. This patch is a prerequisite for a future patch enabling the download of large objects as tarballs. The TLO patch will be added as a dependent patch later. UpgradeImpact ============= During a rolling upgrade, an updated proxy may write a manifest that out-of-date proxies will not be able to read. This will resolve itself once the upgrade completes on all nodes. Change-Id: Ib8dc216a84d370e6da7d6b819af79582b671d699 |
||
|
Zuul
|
9ae5de09e8 | Merge "fix barbican integration" | ||
|
Zuul
|
17eb570a6c | Merge "Improve object-updater's stats logging" | ||
|
Samuel Merritt
|
f64c00b00a |
Improve object-updater's stats logging
The object updater has five different stats, but its logging only told you two of them (successes and failures), and it only told you after finishing all the async_pendings for a device. If you have a cluster that's been sick and has millions upon millions of async_pendings laying around, then your object-updaters are frustratingly silent. I've seen one cluster with around 8 million async_pendings per disk where the object-updaters only emitted stats every 12 hours. Yes, if you have StatsD logging set up properly, you can go look at your graphs and get real-time feedback on what it's doing. If you don't have that, all you get is a frustrating silence. Now, the object updater tells you all of its stats (successes, failures, quarantines due to bad pickles, unlinks, and errors), and it tells you incremental progress every five minutes. The logging at the end of a pass remains and has been expanded to also include all stats. Also included is a small change to what counts as an error: unmounted drives no longer do. The goal is that only abnormal things count as errors, like permission problems, malformed filenames, and so on. These are things that should never happen, but if they do, may require operator intervention. Drives fail, so logging an error upon encountering an unmounted drive is not useful. Change-Id: Idbddd507f0b633d14dffb7a9834fce93a10359ab |
||
|
Alistair Coles
|
6e394bba0a |
Add request_tries option to object-expirer.conf-sample
...and update the object-expirer man page. Change-Id: Idca1b8e3b7d5b40481af0d60477510e2557b88c0 |
||
|
Thiago da Silva
|
a9964a7fc3 |
fix barbican integration
Added auth_url to the context we pass to castellan library. In a change [1] intended to deprecate the use of auth_endpoint passed as the oslo config, it actually completely removed the use of it[2], so this change became necessary or the integration is broken. [1] - https://review.openstack.org/#/c/483457 [2] - https://review.openstack.org/#/c/483457/6/castellan/key_manager/barbican_key_manager.py@143 Change-Id: I933367fa46aa0a3dc9aedf078b1be715bfa8c054 |
||
|
Zuul
|
61c770a6d9 | Merge "add symlink to container sync default and sample config" | ||
|
Clay Gerrard
|
90134ee968 |
add symlink to container sync default and sample config
Change-Id: I83e51daa994b9527eccbb8a88952c630aacd39c3 |
||
|
Alistair Coles
|
8df263184b |
Symlink doc clean up
Cleanup for docs and docstrings. Related-Change: I838ed71bacb3e33916db8dd42c7880d5bb9f8e18 Change-Id: Ie8de0565dfaca5bd8a5693a75e6ee14ded5b7161 |
||
|
Robert Francis
|
99b89aea10 |
Symlink implementation.
Add a symbolic link ("symlink") object support to Swift. This
object will reference another object. GET and HEAD
requests for a symlink object will operate on the referenced object.
DELETE and PUT requests for a symlink object will operate on the
symlink object, not the referenced object, and will delete or
overwrite it, respectively.
POST requests are *not* forwarded to the referenced object and should
be sent directly. POST requests sent to a symlink object will
result in a 307 Error.
Historical information on symlink design can be found here:
https://github.com/openstack/swift-specs/blob/master/specs/in_progress/symlinks.rst.
https://etherpad.openstack.org/p/swift_symlinks
Co-Authored-By: Thiago da Silva <thiago@redhat.com>
Co-Authored-By: Janie Richling <jrichli@us.ibm.com>
Co-Authored-By: Kazuhiro MIYAHARA <miyahara.kazuhiro@lab.ntt.co.jp>
Co-Authored-By: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp>
Change-Id: I838ed71bacb3e33916db8dd42c7880d5bb9f8e18
Signed-off-by: Thiago da Silva <thiago@redhat.com>
|
||
|
Thiago da Silva
|
b86bf15a64 |
remove left-over old doc in config file
Removing the rest of fast post documentation from proxy configuration file. Change-Id: I6108be20606f256a020a8583878e2302e3c98ff1 |
||
|
Zuul
|
2596b3ca9d | Merge "Let clients request heartbeats during SLO PUTs" | ||
|
Tim Burke
|
77a8a4455d |
Let clients request heartbeats during SLO PUTs
An SLO PUT requires that we HEAD every referenced object; as a result, it can be a very time-intensive operation. This makes it difficult as a client to differentiate between a proxy-server that's still doing work and one that's crashed but left the socket open. Now, clients can opt-in to receiving heartbeats during long-running PUTs by including the query parameter heartbeat=on With heartbeating turned on, the proxy will start its response immediately with 202 Accepted then send a single whitespace character periodically until the request completes. At that point, a final summary chunk will be sent which includes a "Response Status" key indicating success or failure and (if successful) an "Etag" key indicating the Etag of the resulting SLO. This mechanism is very similar to the way bulk extractions and deletions work, and even the way SLO behaves for ?multipart-manifest=delete requests. Note that this is opt-in: this prevents us from sending the 202 response to existing clients that may mis-interpret it as an immediate indication of success. Co-Authored-By: Alistair Coles <alistairncoles@gmail.com> Related-Bug: 1718811 Change-Id: I65cee5f629c87364e188aa05a06d563c3849c8f3 |
||
|
Romain LE DISEZ
|
e199192cae |
Replace replication_one_per_device by custom count
This commit replaces boolean replication_one_per_device by an integer replication_concurrency_per_device. The new configuration parameter is passed to utils.lock_path() which now accept as an argument a limit for the number of locks that can be acquired for a specific path. Instead of trying to lock path/.lock, utils.lock_path() now tries to lock files path/.lock-X, where X is in the range (0, N), N being the limit for the number of locks allowed for the path. The default value of limit is set to 1. Change-Id: I3c3193344c7a57a8a4fc7932d1b10e702efd3572 |
||
|
Clay Gerrard
|
45ca39fc68 |
add mangle_client_paths to example config
Change-Id: Ic1126fc95e8152025fccf25356c253facce3e3ec |
||
|
Jenkins
|
94241a81c0 | Merge "Improve domain_remap docs" | ||
|
Jenkins
|
ec3fffabfa | Merge "Add account_autocreate=true to internal-client.conf-sample" | ||
|
Alistair Coles
|
93fc9d2de8 |
Add cautionary note re delay_reaping in account-server.conf-sample
Change-Id: I2c3eea783321338316eecf467d30ba0b3217256c Related-Bug: #1514528 |
||
|
Alistair Coles
|
c662e5fc8e |
Add account_autocreate=true to internal-client.conf-sample
Closes-Bug: #1698426 Change-Id: I8a29a685bb12e60f4da4a0dc8270b408241ec415 |
||
|
Jenkins
|
23de16b0bf | Merge "Move listing formatting out to proxy middleware" | ||
|
Jenkins
|
3fda32470b | Merge "Remove all post_as_copy related code and configes" | ||
|
Kota Tsuyuzaki
|
1e79f828ad |
Remove all post_as_copy related code and configes
It was deprecated and we discussed on this topic in Denver PTG for Queen cycle. Main motivation for this work is that deprecated post_as_copy option and its gate blocks future symlink work. Change-Id: I411893db1565864ed5beb6ae75c38b982a574476 |
||
|
Tim Burke
|
4806434cb0 |
Move listing formatting out to proxy middleware
Make some json -> (text, xml) stuff in a common module, reference that in account/container servers so we don't break existing clients (including out-of-date proxies), but have the proxy controllers always force a json listing. This simplifies operations on listings (such as the ones already happening in decrypter, or the ones planned for symlink and sharding) by only needing to consider a single response type. There is a downside of larger backend requests for text/plain listings, but it seems like a net win? Change-Id: Id3ce37aa0402e2d8dd5784ce329d7cb4fbaf700d |
||
|
junboli
|
df00122e74 |
doc migration: update the doc link address[2/3]
Update the doc link brought by the doc migration. Although we had some effort to fix these, it still left lots of bad doc link, I separate these changes into 3 patches aim to fix all of these, this is the 2st patch for doc/manpages. Change-Id: Id426c5dd45a812ef801042834c93701bb6e63a05 |
||
|
Jenkins
|
b0142d0cd2 | Merge "Retrieve encryption root secret from Barbican" | ||
|
Alistair Coles
|
9c3c388091 |
Improve domain_remap docs
* Make the conditions for remapping clearer * Mention the path_root * Mention '-' -> '_' replacement in account names * Make example consistent with default options Change-Id: Ifd3f3775bb8b13367d964010f35813018b5b41b3 |
||
|
shangxiaobj
|
c93c0c0c6e |
[Trivialfix]Fix typos in swift
Fix typos that found in swift. Change-Id: I52fad1a4882cec4456f22174b46d54e42ec66d97 |
||
|
Mathias Bjoerkqvist
|
77bd74da09 |
Retrieve encryption root secret from Barbican
This patch adds support for retrieving the encryption root secret from an external key management system. In practice, this is currently limited to Barbican. Change-Id: I1700e997f4ae6fa1a7e68be6b97539a24046e80b |
||
|
Jenkins
|
019515e153 | Merge "Update and optimize documentation links" | ||
|
junboli
|
0d07e3fdb1 |
Update and optimize documentation links
* Update URLs according to document migration * Update the dead and outdated links Change-Id: Id92552f4a2d0fb79ddefc55a08636f2e7aeb07cb |
||
|
Clay Gerrard
|
701a172afa |
Add multiple worker processes strategy to reconstructor
This change adds a new Strategy concept to the daemon module similar to how we manage WSGI workers. We need to leverage multiple python processes to get the concurrency properties we need. More workers will rebalance much faster on dense chassis with many devices. Currently the default is still only one process, and no workers. Set reconstructor_workers in the [object-reconstructor] section to some whole number <= the number of devices on a node to get that many reconstructor workers. Each worker will operate on a different subset of disks. Once mode works as before, but tends to want to update recon drops a little bit more. If you change the rings, the strategy will shutdown workers and spawn new ones. You can kill the worker pids and the daemon strategy will respawn them. New per-disk reconstructor stats are dumped to recon under the object_reconstruction_per_disk key. To maintain legacy compatibility and replication monitoring based on cycle times they are aggregated every stats_interval (default 5 mins). Change-Id: I28925a37f3985c9082b5a06e76af4dc3ec813abe |
||
|
Alistair Coles
|
9c5628b4f1 |
Add reconstructor section to deployment guide
Change-Id: I062998e813718828b7adf4e7c3f877b6a31633c0 Closes-Bug: #1626290 |
||
|
Jenkins
|
c3f6e82ae1 | Merge "Write-affinity aware object deletion" | ||
|
Jenkins
|
f1e1dbb80a | Merge "Make eventlet.tpool's thread count configurable in object server" | ||
|
Lingxian Kong
|
831eb6e3ce |
Write-affinity aware object deletion
When deleting objects in multi-region swift delpoyment with write affinity configured, users always get 404 when deleting object before it's replcated to approriate nodes. This patch adds a config item 'write_affinity_handoff_delete_count' so that operator could define how many local handoff nodes should swift send request to get more candidates for the final response, or by default just leave it to swift to calculate the appropriate number. Change-Id: Ic4ef82e4fc1a91c85bdbc6bf41705a76f16d1341 Closes-Bug: #1503161 |
||
|
Samuel Merritt
|
d9c4913e3b |
Make eventlet.tpool's thread count configurable in object server
If you're running servers_per_port > 0 and threads_per_disk = 0 (as it should be with servers_per_port on), each object-server process will have 20 IO threads waiting around to service eventlet.tpool calls. This is far too many; with servers_per_port, there's no real benefit to having so many IO threads. This commit makes it so that, when servers_per_port > 0, each object server defaults to having one main thread and one IO thread. Also, eventlet's tpool size is now configurable via the object-server config file. If a tpool size is set, that's what we'll use regardless of servers_per_port. This allows operators with an excess of threads to remove some regardless of servers_per_port. Change-Id: I8f8914b7e70f2510393eb7c5e6be9708631ac027 Closes-Bug: 1554233 |
||
|
Jenkins
|
2d18ecdf4b | Merge "Replace slowdown option with *_per_second option" |