Commit Graph

6456 Commits

Author SHA1 Message Date
OpenDev Sysadmins 3554ca0262 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:28:36 +00:00
Alistair Coles 4ebdf82228 go: Update README.md to clarify policies allowed
Change-Id: I74a0b3f01d41db23bbe988e93488c175d76d0b52
2016-11-23 15:07:29 +11:00
John Dickinson 0c3f8f8710 Merge branch 'master' into 'feature/hummingbird'
Change-Id: I7cfe7d6a20966e71c7fd3620ef772d5d3f01a27f
2016-11-22 14:14:35 -08:00
Jenkins d299a0a309 Merge "Reduce backend requests for SLO If-Match / HEAD requests" 2016-11-22 18:01:07 +00:00
Jenkins 5fbc9d3c16 Merge "Added comment for "user" option in drive-audit config" 2016-11-22 12:18:47 +00:00
Tim Burke 2d25fe6ad3 Reduce backend requests for SLO If-Match / HEAD requests
... by storing SLO Etag and size in sysmeta.

Previously, we had to GET the manifest for every HEAD or conditional
request to an SLO. Worse, since SLO PUTs require that we HEAD every
segment, we'd GET all included sub-SLO manifests. This was necessary so
we could recompute the large object's Etag and content-length.

Since we already know both of those during PUT, we'll now store it in
object sysmeta. This allows us to:

 * satisfy HEAD requests based purely off of the manifest's HEAD
   response, and
 * perform the If-(None-)Match comparison on the object server, without
   any additional subrequests.

Note that the large object content-length can't just be parsed from
content-type -- with fast-POST enabled, the content-type coming out of
the object-server won't necessarily include swift_bytes.

Also note that we must still fall back to GETting the manifest if the
sysmeta headers were not found. Otherwise, we'd break existing large
objects.

Change-Id: Ia6ad32354105515560b005cea750aa64a88c96f9
2016-11-21 14:39:50 -08:00
Ondřej Nový ae7dddd801 Added comment for "user" option in drive-audit config
Change-Id: I24362826bee85ac3304e9b63504c9465da673014
2016-11-21 22:13:11 +01:00
Thiago da Silva c3e1d847f4 breaking down tests.py into smaller pieces
tests.py is currently at ~5500 lines of code, it's
time to break it down into smaller files.

I started with an easy middleware set of tests
(i.e., versioned writes, ~600 lines of code ) so I can get
some feedback. There are more complicated tests that cover
multiple middlewares for example, it is not so clear where
those should go.

Change-Id: I2aa6c18ee5b68d0aae73cc6add8cac6fbf7f33da
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2016-11-21 12:16:17 +00:00
Ondřej Nový 5d7a3a4172 Removed "in-process-" from func env tox name
This shorten shebang in infra, because we are hitting 128 bytes limit.

Change-Id: I02477d81b836df71780942189d37d616944c4dce
2016-11-19 23:24:30 +01:00
Jenkins 88e57da8c1 Merge "Respect server type for --md5 check in swift-recon" 2016-11-18 18:25:40 +00:00
Jenkins 15e61c82be Merge "Correctly send 412 Precondition Failed in copy middleware" 2016-11-18 13:14:50 +00:00
Jenkins 6bbfcdf8ad Merge "Don't overwrite built-in 'id'" 2016-11-18 11:53:31 +00:00
Jenkins 941172ea88 Merge "Avoid infinite loop while placing parts" 2016-11-18 11:46:14 +00:00
Kota Tsuyuzaki 9ea3402569 Don't overwrite built-in 'id'
This is a follow up for https://review.openstack.org/#/c/399237

'id' is assigned as a builtin function so that we should not use 'id'
for the local variable name.

Change-Id: Ic27460d49e68f6cd50bda1d5b3810e01ccb07a37
2016-11-18 01:53:34 -08:00
John Dickinson bf473ddc9d 2.11.0 release notes
I have reordered the Contributors section of the AUTHORS
file to simply be ordered by the first character in the
author name.

Change-Id: I824022e582cadc361484b20c411840f46c4c5b50
2016-11-17 19:48:52 -08:00
Jenkins 747fdd6e1e Merge "SLO: Concurrently HEAD segments" 2016-11-18 01:58:17 +00:00
Tim Burke 2e7a7347fc Avoid infinite loop while placing parts
Previously, we could over-assign how many parts should be in a tier.
This would cause the local `parts` variable to go negative, which meant
that our `while parts` loop would never terminate.

Change-Id: Id7e7889742ca37cf1a9c0d55fba78d967e90e8d0
Closes-Bug: 1642538
2016-11-17 15:32:47 -08:00
Bryan Keller b94d0db9aa Correctly send 412 Precondition Failed in copy middleware
Previously in copy middleware, if a user entered an invalid destination
path with an invalid `container/object` path the server would return
a 500 Internal Server Error. However, the correct response should be
a 412 Precondition Failed. This patch updates copy so that it catches
the 412 Precondition Failed exception and returns it to the client.

Closes-Bug: #1641980

Change-Id: Ic4677ae033d05b8730c6ad1041bd9c07268e11a9
2016-11-17 17:48:24 +00:00
Jenkins 580654cba0 Merge "Add X-Openstack-Request-Id to Access-Control-Expose-Headers" 2016-11-17 10:05:31 +00:00
Jenkins 891910a1fc Merge "Fix up X-Trans-Id-Extra docs" 2016-11-17 10:05:23 +00:00
zhangyanxian ba1f285fe6 Fix typos in test_container.py
TrivialFix

Change-Id: I6d3422a88b6fd6d2a495d17ff75d292ac96cc251
2016-11-17 02:07:24 +00:00
Jenkins 98a635b242 Merge "Remove duplicated 'User-Agent' header from object-updater's requests" 2016-11-16 21:50:21 +00:00
Tim Burke e8a5448b07 Add X-Openstack-Request-Id to Access-Control-Expose-Headers
Change-Id: Ib95a693042f0b3cf204033eb5957660cb3573dcf
Related-Change: I56cd4738808b99c0a08463f83c100be51a62db05
2016-11-16 12:39:12 -08:00
Tim Burke f850ff065e SLO: Concurrently HEAD segments
Before creating a static large object, we must verify that all of the
referenced segments exist. Previously, this was done sequentially; due
to latency between proxy and object nodes, clients must be careful to
either keep their segment count low or use very long (minute+) timeouts.
We mitigate this somewhat by enforcing a hard limit on segment count,
but even then, HEADing a thousand segments (the default limit) with an
average latency of (say) 100ms will require more than a minute and a
half.

Further, the nested-SLO approach requires multiple requests from the
client -- as a result, Swift3 is in the position of enforcing a lower
limit than S3's 10,000 (which will break some clients) or requiring that
clients have timeouts on the order of 15-20 minutes (!).

Now, we'll perform the segment HEADs in parallel, with a concurrency
factor set by the operator. This is very similar to (and builds upon)
the parallel-bulk-delete work. By default, two HEAD requests will be
allowed at a time.

As a side-effect, we'll also only ever HEAD a path once per manifest.
Previously, if a manifest alternated between two paths repeatedly (for
instance, because the user wanted to splice together various ranges from
two sub-SLOs), then each entry in the manifest would trigger a fresh
HEAD request.

Upgrade Consideration
=====================
If operators would like to preserve the prior (single-threaded) SLO
creation behavior, they must add the following line to their
[filter:slo] proxy config section:

   concurrency = 1

This may be done prior to upgrading Swift.

UpgradeImpact
Closes-Bug: #1637133
Related-Change: I128374d74a4cef7a479b221fd15eec785cc4694a
Change-Id: I567949567ecdbd94fa06d1dd5d3cdab0d97207b6
2016-11-16 12:12:06 -08:00
Tim Burke 40152f4242 Fix up X-Trans-Id-Extra docs
Previously, they would render as "X -Trans-Id-Extra"

Change-Id: Ibaf9b365467a2c91a0f03baed4d7bc36b0fa9967
2016-11-15 14:12:02 -08:00
Jenkins 1835450bff Merge "Better error messages in go/probe" into feature/hummingbird 2016-11-15 19:42:58 +00:00
Janie Richling 8e122c6fe8 Document X-Openstack-Request-Id in all responses
Swift returns `X-Openstack-Request-Id` for container and
object requests as well as account.  A couple api-ref docs are
missing this value in the response examples.

Change-Id: Ifcd67a620e04be5e92b43c7749ee4acb50bb171d
2016-11-15 13:15:59 -06:00
Jenkins 72e413a9ef Merge "remove double checks on account/container info" 2016-11-14 04:30:41 +00:00
Jenkins c3f6727bec Merge "Show file parameters as mandatory in swift-*-info man pages" 2016-11-11 21:22:25 +00:00
Jenkins 6885d7956a Merge "Add OPTIONS in manpages" 2016-11-11 21:22:18 +00:00
Jenkins 2b116cffd3 Merge "Include debug message for rsync tempfiles" 2016-11-11 21:20:59 +00:00
Thiago da Silva d25216bdda remove double checks on account/container info
Continuing the clean up in account and container
info, removed duplicated validation from account_info
and container_info methods, since the same validations
were recently added to get_account_info and get_container_info.

Change-Id: I1ad745fe809367d22649c83f38c4de7a74cac44e
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2016-11-11 10:46:17 -08:00
Alistair Coles 721cd1634a Show file parameters as mandatory in swift-*-info man pages
Changes the file parameters on command line to use the convention of
<file> for a mandatory option rather than [file] which suggests an
optional flag. Also drop to lower case as is convention in other man
pages.

Change-Id: Icfb4b4786343eb493a73b092cad1fdadc935d066
2016-11-11 16:34:15 +00:00
Mohit Motiani 243dd97c58 Add OPTIONS in manpages
swift-account-info, swift-container-info, swift-object-info
and swift-get-node do not contain any information about the available
options. This patch adds OPTIONS in these manpages.

Change-Id: I832c621460ee6bf19adac8e0aadeab32be4b8da0
2016-11-11 16:31:02 +00:00
Jenkins 7b69efe1b6 Merge "Py3: Fixes header key dict" 2016-11-11 13:32:07 +00:00
Christian Hugo b69caeae7d Include debug message for rsync tempfiles
The warning message for rsync tempfiles was removed in the related
change.  However, because our regex match might result in a false
positive maybe it's still useful to log a debug message.  Instead of
silently ignoring rsync tempfiles, when running in debug we note the
file and how we classified it - but still no warning will occur.

I also consolidate our use of the regex for rsync tempfiles into the
diskfile module and move the negative test for the warning logger
message a little next to the positive test.

Change-Id: Idb2a1a76aa275c9c2e9bad8aceea913b8f5b1c71
Related-Change: I5a5d6e24710e4880776b32edcbc07021acf77676
2016-11-11 11:47:19 +00:00
Jenkins 71d0148034 Merge "adding reno sphinx tree" 2016-11-10 23:00:12 +00:00
John Dickinson e6dea4d699 adding reno sphinx tree
This should give the necessary tooling to set up the right
links in the right places so Swift has release notes listed
alongside other projects.

Change-Id: I4e5f1ce1fcfbb2943036c821a24a0b4a3a2d9fc8
2016-11-10 21:34:14 +00:00
Jenkins a30351bdfc Merge "Fix ZeroDivisionError in reconstructor.stats_line" 2016-11-09 04:54:15 +00:00
Tim Burke 5de9747e16 Stop shadowing built-in iter
Change-Id: I0e3fcddfef6968353e4c0aa6871a2e7a22598459
2016-11-08 12:32:18 -08:00
Lokesh S 2f31c0469d Py3: Fixes header key dict
Decode header to latin1 on python3
encode header to utf-8 on python2.

Co-Authored-By: Alistair Coles <alistair.coles@hpe.com>

Change-Id: I10f205a05bb3a566e52a597d9315b3a8b8c14664
2016-11-08 12:22:12 -08:00
Clay Gerrard f4adb2f28f Fix ZeroDivisionError in reconstructor.stats_line
Despite a check to prevent zero values in the denominator python
integer division could result in ZeroDivisionError in the compute_eta
helper function.  Make sure we always have a non-zero value even if it
is small.

NotImplemented:

 * stats calculation is still not great, see lp bug #1488608

Closes-Bug: #1549110
Change-Id: I54f2081c92c2a0b8f02c31e82f44f4250043d837
2016-11-07 18:19:20 -08:00
Jenkins 78527aaf7a Merge "EC: reconstruct using non-durable fragments" 2016-11-07 23:45:11 +00:00
Jenkins c3f9c1cf25 Merge "Fix signal handling for daemons with InternalClient" 2016-11-07 18:36:07 +00:00
Jenkins 03c68dd145 Merge "update urls to newton" 2016-11-07 15:46:15 +00:00
Clay Gerrard c2ce92acd6 Fix signal handling for daemons with InternalClient
The intentional use of "bare except" handling in catch_errors and some
daemons to prevent propagation on unexpected errors that do not
inherit from Exception (like eventlet.Timeout) or even BaseException
(like old-style classes) has the side effect of spuriously "handling"
*expected* errors like when a signal handler raises SystemExit.

The signal handler installed in our Daemon is intended to ensure first
that the entire process group and any forked processes (like rsync's)
receive the SIGTERM signal and also that the process itself
terminates.

The use of sys.exit was not a concious grandiose plans for graceful
shutdown (like the running[0] = False trick that wsgi server parent
process do) - the desired behavior for SIGTERM is to stop - hard.

This change ensures the original goals and intentions of our signal
handler are fulfilled without the undesirable side effect that can
cause our daemons to confusingly log an expected message to stop as an
unexpected error, and start ignoring additional SIGTERM messages;
forcing our kind operators to resort to brutal process murder.

Closes-Bug: #1489209
Change-Id: I9d2886611f6db2498cd6a8f81a58f2a611f40905
2016-11-04 20:00:00 -07:00
Jenkins 71d3ce36b3 Merge "Ignore Range values like "bytes=--0"" 2016-11-05 02:27:29 +00:00
Jenkins d1bb12cf1c Merge "Add probetest for response with duplicate frags" 2016-11-04 18:42:06 +00:00
Clay Gerrard 116462d8a5 Add probetest for response with duplicate frags
When an SSYNC connection fails after shipping a fragment, but before
cleaning itself up - it can lead to multiple replicas of the same
fragment index serviceable in the node_iter at the same time.  Or
perhaps more likely if a partner nodes win a race to rebuild waiting
on a handoff.  In this case, the proxy need not fail to service a GET
just because of extra information.  A similar guard was added to the
reconstructor in a related change [1].

This underlying bug is acctually fixed by the related change [2], this
probetest is just encoding the failure to help with future maintenance.

1. Related-Change: I91f3d4af52cbc66c9f7ce00726f247b5462e66f9
2. Related-Change: I2310981fd1c4622ff5d1a739cbcc59637ffe3fc3

Closes-Bug: 1624176

Change-Id: I06fc381a25613585dd18916d50e7ca2c68d406b6
2016-11-04 17:29:04 +00:00
Alistair Coles 6574ce31ee EC: reconstruct using non-durable fragments
Previously the reconstructor would only reconstruct a missing fragment
when a set of ec_ndata other fragments was available, *all* of which
were durable. Since change [1] it has been possible to retrieve
non-durable fragments from object servers. This patch changes the
reconstructor to take advantage of [1] and use non-durable fragments.

A new probe test is added to test scenarios with a mix of failed and
non-durable nodes. The existing probe tests in
test_reconstructor_rebuild.py and test_reconstructor_durable.py were
broken. These were intended to simulate cases where combinations of
nodes were either failed or had non-durable fragments, but the test
scenarios defined were not actually created - every test scenario
broke only one node instead of the intent of breaking multiple
nodes. The existing tests have been refactored to re-use most of their
setup and assertion code, and merged with the new test into a single
class in test_reconstructor_rebuild.py.

test_reconstructor_durable.py is removed.

[1] Related-Change: I2310981fd1c4622ff5d1a739cbcc59637ffe3fc3

Change-Id: Ic0cdbc7cee657cea0330c2eb1edabe8eb52c0567
Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Closes-Bug: #1624088
2016-11-03 16:54:09 +00:00