Commit Graph

114936 Commits

Author SHA1 Message Date
Kefu Chai
06da7b182e seastar: pickup alien fixes
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-13 22:54:18 +08:00
Kefu Chai
260a702ba9 crimson/common,cmake: use seastar API Level 5
* cmake: bump Seastar_API_LEVEL to "5"
* errorator.h: add invoke() methods to futurize variants, as in seastar
  API level 5, the future's store type is now either monostate or
  a single T, instead of tuple. so it'd be simpler to integrate
  with seastar with invoke() semantic without the boxing-unboxing
  dance.
* errorator.h: drop apply() methods, as they are not used anymore.
* errorator.h: rename and revise tuple2future. as the store type
  is not tuple now, the trait's name is changed accordingly to
  match seastar::internal::future_stored_type

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-10 21:28:55 +08:00
Kefu Chai
285a05d6ea crimson/common: s/result_of/invoke_result/
std::result_of is deprecated in C++17, and removed in C++20, so let's
use std::invoke_result instead

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-10 21:28:55 +08:00
Kefu Chai
0f2e67a616
Merge pull request #37073 from tchaikov/wip-crimson-test-config
test/crimson: fix racing in testing

Reviewed-by: Samuel Just <sjust@redhat.com>
2020-09-10 13:43:13 +08:00
Josh Durgin
ce33c21054
Merge pull request #36961 from jdurgin/wip-auth-perf
mon/AuthMonitor: speed up caps updates

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-09-09 22:12:52 -07:00
Kefu Chai
864364547f cmake: add unittest_seastar_config as a ceph test
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-10 11:53:43 +08:00
Kefu Chai
fe0f662a93 test/crimson: fix racing in testing
before this change, unittest_seastar_config set the specified option to
the shard id in parallel and expects that the values of the option are
consistent across all shards after setting the value on all shards. but
sharded::invoke_on_all() is executed in parallel, and so does
ConfigProxy::do_change(), so there are actually "n x n" continuations
racing each other. the order of the continuations storing the setting
cannot be determined. so we cannot expected that the last batch of
continuations hitting shareds store the same value.

in this change, only a single `conf.set_val()` call is performed with
a known value. and this value is checked with the values stored on all
shards.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-10 11:53:43 +08:00
Kefu Chai
457fe7202f test/crimson: use seastar::make_ready_future()
instead of seastar::now(). as seastar::now() was moved into
seastar/util/laster.hh.

this change is a leftover of aa28b51f3c

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-10 11:53:43 +08:00
Kefu Chai
e5b9b08cc4
Merge pull request #36962 from tchaikov/wip-qa-py3-cleanup
qa: py3 cleanups

Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-09-10 09:39:20 +08:00
Casey Bodley
d03a1cec24
Merge pull request #37054 from cbodley/wip-47306
rgw: ObjectCache::put() clears stale objv

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Mark Kogan <mkogan@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
2020-09-09 17:11:43 -04:00
Matt Benjamin
ce1a1db9fe
Merge pull request #36619 from cbodley/wip-46734
dmclock: update submodule to fix hang on thread shutdown
2020-09-09 15:57:24 -04:00
Matt Benjamin
4c48e03848
Merge pull request #35548 from adamemerson/wip-datalog-fifo
FIFO the Datalog!
2020-09-09 15:56:26 -04:00
Jason Dillaman
fa53f1032f
Merge pull request #36964 from trociny/wip-47275
mgr: don't update pending service map epoch on receiving map from mon

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-09-09 11:32:06 -04:00
Lenz Grimmer
e0b2970bca
Merge pull request #34777 from nSedrickm/grafana-iframe
mgr/dashboard: increase Grafana iframe height to avoid scroll bar

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2020-09-09 11:10:20 +02:00
Kefu Chai
6dea032040
Merge pull request #37057 from tchaikov/wip-bump-seastar
seastar,crimson: bump seastar to use upstream master

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2020-09-09 15:36:04 +08:00
Kefu Chai
ae2b187470
Merge pull request #37042 from xxhdx1985126/wip-47357
crimson/osd: avoid accessing WaitForObjectRecovery::pi when no pulling occurred

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-09-09 13:48:46 +08:00
Kefu Chai
168f23f9c2 seastar: bump seastar to use upstream master
before this change we are using a fork which includes a fix to address
the FTBFS with GnuTLS < 3.5.6

after this change, we are using the lastest upstream which already
contains this fix.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-09 13:27:25 +08:00
Kefu Chai
4234c3f6c0 crimson/osd: print notify_id instead of its address
this addresses the FTBFS like

    /usr/include/fmt/core.h:902:19: error: static assertion failed: formatting of non-void pointers is disallowed
      902 |     static_assert(!sizeof(T), "formatting of non-void pointers is disallowed");
          |                   ^~~~~~~~~~

also, i think it is more helpful in this context to have the
notify id instead of the address, as we can use the id to reference
the notification printed by other logging messages.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-09 13:27:25 +08:00
Kefu Chai
2fa982eabc crimson/os: cast pointers to void* before printing them
to address the FTBFS like:

../src/crimson/os/seastore/lba_manager/btree/btree_range_pin.cc:110:14:   required from here
/usr/include/fmt/core.h:902:19: error: static assertion failed: formatting of non-void pointers is disallowed
  902 |     static_assert(!sizeof(T), "formatting of non-void pointers is disallowed");
      |                   ^~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-09 13:27:25 +08:00
Kefu Chai
ebfed2b1ac crimson/os: instantiate future_type<> with future_stored_type
to accommodate the change on seastar's side, which started to use
monostate for representing `void` return type, and hide this convention
using future_stored_type_t.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-09 13:27:25 +08:00
Kefu Chai
5563e0584b crimson/common: move continuation_base_from_future out of internal namespace
otherwise we have

../src/crimson/common/errorator.h:1090:8: error: specialization of ‘template<class Future> struct seastar::continuation_base_from_future’ in different namespace [-fpermissive]
 1090 | struct continuation_base_from_future<Container<::crimson::errorated_future_marker<Values...>>> {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

since seastar has moved its continuation_base_from_future() out
of seastar::internal into seastar namespace

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-09 13:27:25 +08:00
Kefu Chai
ce8b544b98 crimson/net: print entity_addr_t not the in4_addr in it
for two reasons:

* we don't have operator<<(ostream&, in4_addr&) defined.
* we don't have any fmt::format() facility specialized for in4_addr
* to print entity_addr_t instead of in4_addr is more correct in
  the sense that we should support IPv6

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-09 13:27:25 +08:00
Kefu Chai
6e7cc5b2c4 test/crimson: include seastar/util/later.hh for seastar::now()
seastar::now() is extracted into seastar/util/later.hh in a recent
change in seastar, so update accordingly

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-09 13:27:25 +08:00
Kefu Chai
8d814cc09a crimson: include seastar/core/when_all.hh for when_all()
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-09 13:26:11 +08:00
Xuehan Xu
d5fc5708fa crimson/osd: use temporary RecoveryInfo for recovering object delete ops
Right now, recover_delete use WaitForObjectRecovery::pi, which may not be available
if there were no pulling, to pass recovery_info, so use temporary recovery_info instead

Fixes: https://tracker.ceph.com/issues/47357
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
2020-09-09 13:15:49 +08:00
Xuehan Xu
652ecffaf1 crimson/osd: set push future an exception when there are errors during pushing
Fixes: https://tracker.ceph.com/issues/47357
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
2020-09-09 13:15:44 +08:00
Kefu Chai
86e9b6887f crimson/net: do not print non-void* pointer
to address the failure like

fmt/core.h:902:19: error: static assertion failed: formatting of non-void pointers is disallowed
  902 |     static_assert(!sizeof(T), "formatting of non-void pointers is disallowed");
      |                   ^~~~~~~~~~

and i searched around, couldn't find any other
statement printing the address of message, so
i think it's not of much use to print their
addresses in a single place, unless we can cross
check them in different places.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-09 12:03:37 +08:00
Kefu Chai
aa28b51f3c crimson: use seastar::make_ready_future()
instead of seastar::now(). as seastar::now() was moved into
seastar/util/laster.hh.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-09 12:03:37 +08:00
Adam C. Emerson
dbd2ee5819 cls/fifo: Add 'exclusive' option to Trim
To support RGW's MetadataLog, add a flag to FIFO::trim that when true
trims up to but not including the given entry.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
0819f57474 rgw: Datalog with selectable backends, FIFO and Omap
By default, use whatever is present (and use FIFO if nothing is
present.)

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
af522e06f9 rgw: Fix async caller into Datalog
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
56aa586f9c rgw: Remove superfluous wrapper around datalog
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
ebc1eed202 rgw: Normalize DataLog function signatures
Pull out the stuff we aren't using so FIFO and Timelog Datalog can use
the same interface.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
50c8646a75 common: Make error conversion functions nodiscard
As suggested by Casey, so the compiler can catch failures to return
errors.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
186b22175c rgw: Get rid of BucketFilter class, use a std::function
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
ae5660fbb6 rgw: Remove date from REST log trim/list
Also only accept one marker.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
26f5b2f58e rgw: Remove some TimeLog options from radosgw-admin
Remove date-oriented trim/list functionality from MDLOG, DataLog, and
Sync-Error-Log.

Don't provide start/end markers. Support only a start marker for list
and an end marker for trim.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
6110ba6058 gitignore: Add vstart_environment.sh
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
2d2a90c15a rgw: FIFO for legacy RADOS client
Use optional_yield for most operations and provide an AioCompletion*
overload for trim.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
6c950a2c2d cls/fifo: Use neorados interface
Rewrite around the asynchronous ASIO-based RADOS interface, and
include support for calls from multiple threads.

`allocate_unique` pattern contributed by
Casey Bodley <cbodley@redhat.com>

Co-authored-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Yehuda Sadeh
55255343f7 cls/fifo: FIFO over RADOS
This is an implementation of fifo queue over rados. Data is appended
to rados object until it's full. At that point data will be written to
a new object. Data is read from the tail sequentially (can be iterated
using marker). Data can be trimmed (up to and including marker).

Queue has a header object (meta), and zero or more data objects (parts).

The software has two layers: the higher level client operations side
that deals with the application apis, and manages the meta and parts,
and there’s the objclass level that deals with the rados layout of
meta and part objects. There are different objclass methods that deal
with reading and modifying each of these entities.

A single part has max possible size, however, it may become full once
a certain smaller size is reached (full_size_threshold). It is
imperative that once a part has reached its capacity, it will not
allow any more writes into it. For this reason, it is important that
data being written to the queue does not exceed max_entry_size . This
is enforced, by the higher level client api.

Written entries go to the current head object, and when it’s full, a
new head part is created. When listing entries, data is iterated from
tail to the current head. Trim can either change the pointer within
the current tail object, and if needed it removes tail objects.

A unitest has been created to test functionality.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Squashed-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
a29695e82e strtol: Add parse/consume for string_view friendly interface
Also these don't have the stringstream overhead.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
4cec019d5e common/Thread: Don't store pointer to thread_name
Having Thread::create store a pointer to a string that is passed to
ceph_pthread_setname in Thread::entry_wrapper can lead to using a
pointer in the calling thread's stack that gets freed before use.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
2d4c9acc98 common/ceph_json: Support en/decoding Boost's flat containers
Specifically boost::container::flat_map and boost::container::flat_set

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
813acd5d86 common/async: Add handler for librados::AioCompletion
Support using a librados::AioCompletion as a completion handler in
Boost.Asio when the arguments are void or only an error code.

(To support more arguments we'd have to wrap up the AioCompletion with
pointers to hold them.)

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Casey Bodley
3e5ecffceb common: add ceph::allocate_unique()
adds an allocator-aware version of std::make_unique(). this is similar to
std::allocate_shared(), though it's slightly less convenient because,
unlike std::shared_ptr<T>, the Deleter has to be specified as a template
parameter in std::unique_ptr<T, Deleter>

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
fba1845211 common: bind_like
A template to ensure that one completion has the same executor and
allocator as another.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
9bab68c0f4 common: Add bind_allocator template
Bind an allocator to a completion, analogously to
boost::async::bind_executor.

Based on bind_executor.hpp which is copyright 2003-2019
Christopher M. Kohlhoff <chris@kohlhoff.com> and under
the Boost Software License, Version 1.0

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Adam C. Emerson
da7835947e include: Import (modified) uses_allocator.h
From https://github.com/phalpern/uses-allocator

To handle uses_allocator construction

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-08 22:09:40 -04:00
Yuri Weinstein
9849b2eb8b
Merge pull request #37049 from yuriw/wip-yuriw-crontab-master
qa/tests: removed extra line

Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-09-08 15:57:20 -07:00