6828 Commits

Author SHA1 Message Date
Jenkins
c9acb0a717 Merge "functests: Only convert headers that should be ints to be ints" 2017-08-18 07:54:17 +00:00
Jenkins
f6b78f6de8 Merge "Clarify usage of replicator and reconstructor override options" 2017-08-18 03:08:06 +00:00
Jenkins
16bc798f0e Merge "Use more specific asserts in test/unit/account tests" 2017-08-18 03:07:59 +00:00
Jenkins
cb1c438006 Merge "Add functests for disallowed COPYs into a versioned container" 2017-08-18 03:04:11 +00:00
Jenkins
d9f971931a Merge "Fix flakey EC frag duplication policy test" 2017-08-17 22:39:33 +00:00
Jenkins
a5955140e3 Merge "Allow to rebuild a fragment of an expired object" 2017-08-17 22:37:31 +00:00
Jenkins
179a5c78dc Merge "Remove unnecessary exception handling" 2017-08-17 09:31:12 +00:00
Jenkins
9af35b7d95 Merge "Fix deadlock when logging from a tpool thread." 2017-08-17 06:22:24 +00:00
Jenkins
232050349f Merge "Add test for all-nodes-error-limited" 2017-08-17 02:54:09 +00:00
Jenkins
d17ba3dcc2 Merge "Always check for unexpected requests in mocked_http_conn" 2017-08-17 02:52:21 +00:00
Samuel Merritt
6d160797fc Fix deadlock when logging from a tpool thread.
The object server runs certain IO-intensive methods outside the main
pthread for performance. If one of those methods tries to log, this can
cause a crash that eventually leads to an object server with hundreds
or thousands of greenthreads, all deadlocked.

The short version of the story is that logging.SysLogHandler has a
mutex which Eventlet monkey-patches. However, the monkey-patched mutex
sometimes breaks if used across different pthreads, and it breaks in
such a way that it is still considered held. After that happens, any
attempt to emit a log message blocks the calling greenthread forever.

The fix is to use a mutex that works across different greenlets and
across different pthreads. This patch introduces such a lock based on
an anonymous pipe.

Change-Id: I57decefaf5bbed57b97a62d0df8518b112917480
Closes-Bug: 1710328
2017-08-16 14:10:25 -07:00
Alistair Coles
88252cdfd6 Fix flakey EC frag duplication policy test
Fixes test_GET_with_duplicate_but_sufficient_frag_indexes
failing intermittently.

The original non-duplicated-frags version of the test in
TestECObjController verified that the controller would search all
primaries, ignoring repeated fragment indexes and finally find the
last necessary unique fragment on the first handoff. The version of
the test for a duplicated fragments policy in
TestECDuplicationObjController had the final necessary fragment on the
first of the 'duplicate' primaries (index ec_num_unique_fragments + 1)
so there was a chance that it would be found before all of the first
ec_num_unique_fragments had been tried, causing the test to fail as
reported in the linked bug report.

This patch moves the final necessary unique fragment to the first
handoff (index 2 * index ec_num_unique_fragments + 1) and aligns the
test with the intent of the equivalent test in TestECObjController,
so that the two tests can be moved to a single implementation in an
inherited mixin.

test_GET_with_duplicate_but_insufficient_frag is also moved to the
new mixin since the two implementations of that test were also very
similar.

Change-Id: I4d99dea8e941bccb6fa610bab39e38a6976a3721
Closes-Bug: #1710951
2017-08-16 12:20:05 +01:00
Jenkins
f9cacb3740 Merge "Use unique body content in EC test objects" 2017-08-16 01:44:03 +00:00
Alistair Coles
665e21bbe6 Use unique body content in EC test objects
Avoid ever having two objects in same test with same etag.

Refactor some common test helper methods to a common superclass.

Change-Id: Ib956c997f8805df1859ebf3582f7ce59c8f65129
Closes-Bug: #1710924
2017-08-15 20:08:31 +00:00
Tim Burke
e17b921e39 Add test for all-nodes-error-limited
Change-Id: I4132c8fceec92dcbb04dd018ed49f1d76899cb25
2017-08-11 10:34:49 -07:00
Tim Burke
6f55a5ea94 Always check for unexpected requests in mocked_http_conn
Change-Id: Ie0ea9971129b6d090a0fcb7c5be33acb6c9b512d
Related-Change: Ia72c407247e4525ef071a1728750850807ae8231
2017-08-11 09:54:39 -07:00
Tim Burke
0d4d940243 Make test_get_more_nodes_with_zero_weight_region more robust
...by using a random ring, looking at *all* partitions, and making
assertions about the distribution of how many times we have to call
next().

Change-Id: Ia5feb9396d4bf6fd35f16bbc5280e63022ed2c47
2017-08-11 09:53:20 -07:00
Jenkins
bf09a06708 Merge "Unset random seed after rebalancing ring" 2017-08-11 14:56:31 +00:00
Alistair Coles
7fa9d6e5b4 Unset random seed after rebalancing ring
Unit tests use the random module in places to randomise
test inputs, but once the tests in test_builder.py or
test_ring_builder_analyzer.py have been run the random
seed is left in a repeatable state because calls are made
to RingBuilder.balance with a seed value. Consequently,
subsequent calls to random in other tests get repeatable
results from one test run to another.

This patch resets the state of the random module before
returning from RingBuilder.rebalance.

Closes-Bug: #1639755
Change-Id: I4b74030afc654e60452e65b3e0f1b45a189c16e3
2017-08-08 22:34:04 +00:00
Tim Burke
d8c7d21cfc Add functests for disallowed COPYs into a versioned container
While we're at it, have copy and copy_account raise ResponseErrors
on failure, similar to cluster_info, update_metadata, containers, info,
files, delete, initialize, read, sync_metadata, write, and post.

Related-Change: Ia8b92251718d10b1eb44a456f28d3d2569a30003
Change-Id: I9ef42d922a6b7dbf253f2f8f5df83965d8f47e0f
2017-08-08 18:25:14 +00:00
Jenkins
f7c55c169a Merge "Turn on warning-is-error in doc build" 2017-08-08 03:33:14 +00:00
Jenkins
7b2faca545 Merge "[Trivialfix]Fix typos in swift" 2017-08-07 20:12:00 +00:00
Jenkins
53defc8b9e Merge "Fix intermittent failure in test_POST_but_expired" 2017-08-07 07:16:45 +00:00
Romain LE DISEZ
69df458254 Allow to rebuild a fragment of an expired object
When a fragment of an expired object was missing, the reconstructor
ssync job would send a DELETE sub-request. This leads to situation
where, for the same object and timestamp, some nodes have a data file,
while others can have a tombstone file.

This patch forces the reconstructor to reconstruct a data file, even
for expired objects. DELETE requests are only sent for tombstoned
objects.

Co-Authored-By: Alistair Coles <alistairncoles@gmail.com>
Closes-Bug: #1652323
Change-Id: I7f90b732c3268cb852b64f17555c631d668044a8
2017-08-04 23:05:08 +02:00
shangxiaobj
c93c0c0c6e [Trivialfix]Fix typos in swift
Fix typos that found in swift.

Change-Id: I52fad1a4882cec4456f22174b46d54e42ec66d97
2017-08-04 07:50:10 +00:00
Jenkins
0b22193718 Merge "Correct documentation link address in README" 2017-08-03 00:19:26 +00:00
OpenStack Proposal Bot
b69b47c08c Imported Translations from Zanata
For more information about this automatic import see:
http://docs.openstack.org/developer/i18n/reviewing-translation-import.html

Change-Id: I62393843d8e97e45b02bff72dae007da44d9258a
2017-08-02 10:44:25 +00:00
zhangdebo1987
8db22bdc1f Correct documentation link address in README
Correct documentation link address in README.

Change-Id: I1f6ac13eebf05e5deb7fe07ae7a202e1dd4e544a
2017-08-02 15:54:55 +08:00
Jenkins
019515e153 Merge "Update and optimize documentation links" 2017-08-01 21:27:18 +00:00
junboli
0d07e3fdb1 Update and optimize documentation links
* Update URLs according to document migration
 * Update the dead and outdated links

Change-Id: Id92552f4a2d0fb79ddefc55a08636f2e7aeb07cb
2017-08-01 15:12:00 +01:00
Jenkins
00c941bcfe Merge "Test reconstruct() with no EC policies" 2017-08-01 11:05:13 +00:00
Jenkins
a5144c0be7 Merge "Update URL home-page in documents according to document migration" 2017-08-01 11:02:44 +00:00
Tim Burke
8d05325f03 Test reconstruct() with no EC policies
We have a test for get_local_devices, but let's make some broader
assertions as well.

Related-Bug: #1707595
Change-Id: Ifa696207ffdb3b39650dfeaa3e7c6cfda94050db
2017-08-01 09:18:07 +01:00
Kota Tsuyuzaki
45cc1d02d0 Fix reconstructer to be able to run non ec policy environment
Since the related change, object-reconstructor gathers the local devices
for ec policy via get_local_devices method but the method causes TypeError when
attempting *reduce* for empty set list. the list can be empty when no EC config
found in swift.conf.

This patch fixes the get_local_devices to return empty set even when no ec config
in swift.conf without errors.

Co-Authored-By: Kirill Zaitsev <k.zaitsev@me.com>
Change-Id: Ic121fb547966787a43f9eae83c91bb2bf640c4be
Related-Change: 701a172afac37229b85ea762f20428f6f422d29b
Closes-Bug: #1707595
2017-07-31 18:46:22 +09:00
Akihiro Motoki
d18e847c94 Turn on warning-is-error in doc build
* Fixes warnings in RST file
* Suppress warning log from pyeclib during the doc build.
  pyeclib emits a warning message on an older liberasurecode [1]
  and sphinx treats this as error (when warning-is-error is set).
  There is no need to check warnings during the doc build,
  so we can safely suppress the warning.

This is a part of the doc migration community-wide effort.
http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html

[1] https://github.com/openstack/pyeclib/commit/d163972b

Change-Id: I9adaee29185a2990cc3985bbe0dd366e22f4f1a2
2017-07-30 14:56:12 +00:00
Jenkins
340014ed22 Merge "2.15.0 authors and changelog update" 2017-07-28 00:54:30 +00:00
Jenkins
0e3926f471 Merge "added .htaccess redirect file for docs" 2017-07-28 00:53:40 +00:00
John Dickinson
dfd0ea20a1 2.15.0 authors and changelog update
Change-Id: I8ee9d657ebc030b9335cb53a51951c118539cb91
2017-07-27 14:44:21 -07:00
Jenkins
4b1acd8050 Merge "Add unit test for ObjectReconstructor.is_healthy" 2017-07-27 21:09:06 +00:00
John Dickinson
9155e6f0d7 added .htaccess redirect file for docs
also added a test redirect so we know if things are working

Change-Id: I8fd848c23053e52e45fa55637f280124eba74927
2017-07-27 14:06:51 -07:00
Jenkins
2105ad2a7f Merge "Add multiple worker processes strategy to reconstructor" 2017-07-27 21:06:50 +00:00
Alistair Coles
56a18ac9b7 Add unit test for ObjectReconstructor.is_healthy
Add a test that verifies that get_all_devices does
fetch devices from the ring.

Related-Change: I28925a37f3985c9082b5a06e76af4dc3ec813abe

Change-Id: Ie2f83694f14f9a614b5276bbb859b9a3c0ec5dcb
2017-07-27 14:14:26 +01:00
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
2017-07-26 16:55:10 -07:00
Jenkins
4ac456882e Merge "Add ever_rebalanced property to RingBuilder" 2017-07-26 22:07:02 +00:00
Jenkins
39f46f552e Merge "Small fixup for CooperativeRingBuilder" 2017-07-26 13:25:33 +00:00
Kota Tsuyuzaki
93b8cf52eb Small fixup for CooperativeRingBuilder
This is follow up for the related change [1].

Just adding small docs and removing unnecessary arg in the test.

[1] Related-Change: I1b30cb3d776be441346a4131007d2487a5440a81
Change-Id: I48c21b6028bd2ef454e084032a2bd8c0d4239e4b
2017-07-26 13:19:07 +01:00
Alistair Coles
b599b48f69 Clarify usage of replicator and reconstructor override options
Clarify in usage statement and man pages that CLI override options for
swift-object-reconstructor and swift-object-replicator only have
effect when --once is used.

Also add a link to object reconstructor source code docs to the doc
index page for consistency with the other object services.

Change-Id: If348b340d59a672d3a19d4df231ebdb74f4aed51
2017-07-26 12:53:46 +01:00
Jenkins
ae65874b13 Merge "Ring rebalance respects co-builders' last_part_moves" 2017-07-26 11:45:04 +00:00
Jenkins
972f7c9f45 Merge "Remove left over param" 2017-07-26 08:49:33 +00:00
Jenkins
372d7a5cc0 Merge "ready yet? nope, please wait!" 2017-07-26 02:36:32 +00:00