Commit Graph

81604 Commits

Author SHA1 Message Date
Jason Dillaman
548bc8bad2
Merge pull request #19437 from trociny/wip-mock-valgrind
test/rbd_mirror: "use of uninitialised value" valgrind warning

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-12-12 10:09:15 -05:00
Sage Weil
c142ae3f15 log: add log_stderr_prefix option
Allows you to set a prefix for debug log messages send to stderr (e.g.,
"debug ").

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-12 08:38:41 -06:00
Yehuda Sadeh
a01c014772
Merge pull request #19253 from oritwas/wip-rgw-22124
rgw: reshard should not update stats when linking new bucket instance

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-12-12 14:14:41 +02:00
Mykola Golub
bad51ffe7f rbd-nbd: support optionally setting device timeout
Fixes: http://tracker.ceph.com/issues/22333
Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-12-12 11:10:54 +02:00
Sage Weil
4389b55435 Merge remote-tracking branch 'gh/mimic-dev1' 2017-12-11 22:27:35 -06:00
Sage Weil
6fdd8ba284
Merge pull request #19435 from smithfarm/wip-20559
doc: globally change CRUSH ruleset to CRUSH rule

Reviewed-by: Sage Weil <sage@redhat.com>
2017-12-11 18:55:13 -06:00
Boris Ranto
ce2e26d39a librbd: Do not instantiate TrimRequest template class
We include TrimRequest.cc in librbd tests at two places:
 - operation/test_mock_TrimRequest.cc
 - operation/test_mock_ResizeRequest.cc

That causes linking errors when doing the builds because some of the
instantiated classes are defined twice.

We can fix this by not instantiating the template class in the
TrimReqeust.cc file when including it in the tests.

Signed-off-by: Boris Ranto <branto@redhat.com>
2017-12-12 01:08:04 +01:00
Casey Bodley
f8909bb6a6 qa/rgw: disable log trim in multisite suite
the multisite tests run manual trim operations with radosgw-admin, which
can race with internal log trimming to produce tests failures

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-12-11 16:48:02 -05:00
Sage Weil
fef5fe8ba0 osd/PrimarLogPG: remove jewel compat for error code logging
Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
3ccc436f9f os/bluestore: simplify Onode tracking for removed object
Make the only caller of removed() not need to call note_modified_object
separately, dropping the unneeded erase() call.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
0ededde59f os/bluestore: store shard, not shard_hint,in OpSequencer
Good suggestion from Igor!

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
75b71abc76 osd/PrimaryLogPG: sync complete from C_OSD_OpApplied
Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
0347518d02 os/bluestore: keep ref to deleted onode in _do_remove
We need to make sure we carry this ref through until the object is
deleted or else another request right try to read it before the kv
txn is applied.  (This is easy to trigger now that onreadable is completed
at queue time instead of commit time.)

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
8dae6d198e ceph_test_objectstore: flush() before collection_list()
The one exception to the "immediately readable" it collection_list, which
is not readable until the kv transaction is applied.  Our choices are

1. Wait until kv to apply to trigger onreadable (for any create/remove
ops).  This wipes away much of the benefit of fully sync onreadable.

2. Add tracking for created/removed objects in BlueStore so that we can
incorporate those into collection_list.  This is complex.

3. flush() from collection_list.  Unfortunately we don't have osr linked
to Collection, so this doesn't quite work with the current ObjectStore
interface.

4. Require the caller flush() before list and put a big * next to the
"immediately onreadable" claim.  It turns out that because of FileStore,
the OSD already does flush() before collection_list anyway, so this does
not require any actual change... except to store_test tests.  (This didn't
affect filestore because store_test is using apply_transaction, which
waits for readable, and on filestore that also implies visible by
collection_list.)

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
354a6bab56 os/bluestore/BitmapFreelistManager: disable bluestore_debug_freelist
This doesn't work as implemented.  We are doing _txc_finalize_kv() from
queue_transactions, which calls into the freelist and does this verify
code.  However, we have no assurance that a previous txc in the sequencer
has applied its changes to the kv store, which means that a simple sequence
like

 - write object
 - delete object

can trigger if the write is waiting for aio.  This currently happens
with ObjectStore/StoreTest.SimpleRemount/2.

Comment out the verify, but leave _verify_range() helper in place in case
we can use it in the future in some other context.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
ec9f1fe4ca os/bluestore: fix _set_alloc_sizes dout
Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
dbb365de83 os/bluestore: avoid OpSequencer::parent
The parent may go away, so we need to keep our own copy of shard_hint in
OpSequencer to avoid a user-after-free (e.g., when the user drops their
osr and calls OpSequencer::discard()).

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
c77cb1b98d os/ObjectStore: expose is_sync_onreadable()
Only FileStore is false.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
6d7d8ba94b osd/PrimaryLogPG: sync_complete for C_OSD_AppliedRecoveryObject[Replica]
Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
779e01085b osd/PG: sync_complete for C_UpdateLastRollbackInfoTrimmedToApplied
One of these is attached to every write!

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
4df1645ee5 osd: allow BlessedContexts to finish synchronously
If bluestore chooses to it may try to call sync_finish() from the queueing
call chain (instead of finish() from a Finisher).  Allow it for several
Contexts in PG and PrimaryLogPG, including those used for the main IO
path.

We assume here that all Contexts that we bless can complete synchronously
by calling their normal finish() method.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
df1c7308c9 os/bluestore: simplify completion roll-ups
No need to wrap these in C_Contexts and do a new allocation; just slurp
up the list elements directly.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
7bca217ede os/bluestore: call onreadable from queue_transaction
Bluestore updates are immediately present in the cache and readable.  The
only exception are omap updates, but the read methods there block until
they commit, so we can still tell the OSD that they are readable.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:04:57 -06:00
Sage Weil
b877860e42 osd: flush before collection_list()
We would get this implicitly with FileStore if we waited for the onreadable
callbacks, but in some cases the OSD has already done that.  With BlueStore,
we need to explicitly flush().

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:04:57 -06:00
Sage Weil
eff2a4d24b include/Context: add sync_complete support to C_Contexts
Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:04:57 -06:00
Sage Weil
dfd52c2bc3 include/Context: add sync_complete() hook
Sometimes we are able to complete a context synchronously, within the same
callchain of the caller who queued it.  In this case the locking rules are
usually a bit different for the caller.  Add a generic Context hook that
allows this.

If a sync-capable Context implements sync_complete, it can do whatever
it needs to do for this particular event.  If it is not implemented, the
generic implementation will return false, and the caller can use the
normal complete() as it normally would have (presumably by calling it
asynchronously, e.g., in a Finisher).

If sync_complete() is implemented, it *must* return true.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:04:57 -06:00
Sage Weil
f46efeb47c common/Finisher: simplify
The second _rval list was a dumb idea.  A vector of pairs is simpler
and more efficient.

Also, extend support to any container type.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:04:57 -06:00
Mykola Golub
3ea5799cde test/rbd_mirror: "use of uninitialised value" valgrind warning
The `on_call` context serves as a barrier and should be completed
after the `on_start_ctx` context is assigned.

The warning was observed sporadically e.g. by repeating
WaitingOnNonLeaderAcquireLeader test under valgrind.

Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-12-11 22:56:40 +02:00
Patrick Donnelly
0a40f4fb46
mds: organize Filesystem class def
This follows the coding style guidelines:

https://google.github.io/styleguide/cppguide.html#Declaration_Order

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-12-11 11:51:06 -08:00
Gregory Farnum
da7d071654
Merge pull request #19191 from tchaikov/wip-mon-cleanup
mon: remove_is_write_ready()

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-12-11 11:46:19 -08:00
Casey Bodley
5d4da4598d
Merge pull request #17438 from mikulely/fix-mstop
vstart.sh: fix mstop.sh can not stop rgw

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-12-11 14:11:06 -05:00
Dmitry Plyakin
56344f0e14 rgw: fix GET website response error code
Change NoSuchKey error code to NoSuchWebsiteConfiguration, when bucket doesn't have website configuration.

Fixes: http://tracker.ceph.com/issues/22272
Signed-off-by: Dmitry Plyakin <dplyakin@gmail.com>
2017-12-11 20:44:05 +03:00
Kefu Chai
e6695bb63a cmake: link executables against ceph-common
so they can have access to libstdc++ if it is linked statically.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-12 00:26:52 +08:00
Kefu Chai
4c2216de6a cmake: add WITH_STATIC_LIBSTDCXX option
to link libceph-common with libstdc++ if it is enabled.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-12 00:26:52 +08:00
Patrick Donnelly
6f3553351d
Merge PR #19432 into master
* refs/pull/19432/head:
	doc: correct the new fs allow opts

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-12-11 08:18:11 -08:00
Nathan Cutler
aea9fa01ae doc: globally change CRUSH ruleset to CRUSH rule
Since kraken, Ceph enforces a 1:1 correspondence between CRUSH ruleset and
CRUSH rule, so effectively ruleset and rule are the same thing, although
the term "ruleset" still survives - notably in the CRUSH rule itself, where it
effectively denotes the number of the rule.

This commit updates the documentation to more faithfully reflect the current
state of the code.

Fixes: http://tracker.ceph.com/issues/20559
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2017-12-11 17:15:23 +01:00
Mykola Golub
65b92c40ac pybind/rbd: add deep_copy method
Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-12-11 18:09:10 +02:00
Kefu Chai
8a0935988f install-deps.sh: use GCC-7 on xenial also
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-11 23:26:24 +08:00
Jason Dillaman
f10904b617
Merge pull request #19416 from trociny/wip-flatten-cleanup
librbd: remove unused member in FlattenRequest

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-12-11 10:01:23 -05:00
Wido den Hollander
3f07636bc2
mgr/influx: Print (in debug) time it takes to send data to Influx
On large clusters it might take a very long time to send data to Influx
due to the gathering and parsing of statistics.

By keeping a counter and printing it admins can adjust the interval if it
becomes to heavy for their cluster.

Signed-off-by: Wido den Hollander <wido@42on.com>
2017-12-11 15:44:05 +01:00
Wido den Hollander
429718af1c
mgr/influx: Revise configuration of module
It's a lot like the Zabbix module and allows for setting configuration
options on run-time and also fetch them from the module.

A few additional commands have been registered to make sure it is easy
to interact with the module.

Signed-off-by: Wido den Hollander <wido@42on.com>
2017-12-11 15:33:53 +01:00
Wido den Hollander
2b71a8919c
mgr/influx: Send fsid as a tag to Influx to identify cluster
This allows for multiple Ceph clusters to send their data to the
same Influx database.

Using the fsid values for different clusters can be queried from
Influx

Signed-off-by: Wido den Hollander <wido@42on.com>
2017-12-11 15:30:42 +01:00
Wido den Hollander
9440be3da2
mgr/influx: PEP-8 fixes to InfluxDB module
The code now scores:

  Your code has been rated at 8.94/10

Various indentation fixes, whitespaces and other PEP-8 related changes

Signed-off-by: Wido den Hollander <wido@42on.com>
2017-12-11 15:29:08 +01:00
Dan van der Ster
9d55d17c4e doc: correct the new fs allow opts
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
2017-12-11 13:32:59 +01:00
Tianshan Qu
a0b51eef86 rgw: fix recursive lock
Signed-off-by: Tianshan Qu <tianshan@xsky.com>
2017-12-11 19:48:00 +08:00
Kefu Chai
2d641bde20
Merge pull request #19426 from tchaikov/wip-cmake
cmake: disable FAIL_ON_WARNINGS for rocksdb
2017-12-11 16:34:41 +08:00
Kefu Chai
6559a85051 cmake: disable FAIL_ON_WARNINGS for rocksdb
otherwise -Werror=implicit-fallthrough will fail the build with GCC-7

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-11 14:09:45 +08:00
kungf
92910a9535 osd: reduce all_info map find to get primary
Signed-off-by: kungf <yang.wang@easystack.cn>
2017-12-11 11:00:18 +08:00
Yan, Zheng
7ffa87e6a2 osdc/Journaler: add 'stopping' check to various finish callbacks
These callbacks are executed by finisher. When they are being executed,
Journaler can be in stopping state.

Fixes: http://tracker.ceph.com/issues/22360
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-12-11 09:12:04 +08:00
Patrick Donnelly
d2ebe22a49
Merge PR #19373 into master
* refs/pull/19373/head:
	client: drop duplicate friend

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-12-09 16:34:24 -08:00