Casey Bodley [Tue, 7 Jan 2020 18:30:51 +0000 (13:30 -0500)]
rgw: remove spawned_keys filter from incremental data sync
the spawned_keys filtering is valid "as long as we don't yield",
according to code comments. however, proper enforcement of the
spawn window necessitates yielding when we exceed that window
the key-based filtering provided by spawned_keys is actually already
satisfied by the call to marker_tracker->index_key_to_marker(), which
also takes completions (either from try_update_high_marker() or
finish()) into account
Casey Bodley [Tue, 7 Jan 2020 18:28:19 +0000 (13:28 -0500)]
rgw: incremental data sync respects spawn window
RGWReadRemoteDataLogShardCR will fetch up to 1000 entries. in order for
the spawn window to apply correctly, it has to be enforced inside the
loop over those entries
Ronen Friedman [Mon, 6 Jan 2020 07:46:49 +0000 (09:46 +0200)]
crimson: fix lambda captures of non-variables
One cannot just capture a structured binding "non-variable".
(From the C++ standard, $8.4.5.2:
"If a lambda-expression [...] captures a structured binding (explicitly or implicitly),
the program is ill-formed.")
* refs/pull/31494/head:
qa: force creation of fs with EC default data pool
qa: add tests for adding EC data pools
mon/MDSMonitor: warn when creating fs with default EC data pool
Reviewed-by: Greg Farnum <gfarnum@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
Ilya Dryomov [Thu, 19 Dec 2019 18:02:18 +0000 (19:02 +0100)]
qa: krbd_exclusive_option.sh: fixup for json.tool ordering change
In Python 3.5 json.tool was changed to produce unsorted output and
--sort-keys option was added to compensate. This wasn't caught by 4fe245cc2f2d ("qa: update krbd tests for python3") because it raced
with 50933b863a1d ("qa: krbd_exclusive_option.sh: update for recent
kernel changes").
Ilya Dryomov [Wed, 18 Dec 2019 13:32:11 +0000 (14:32 +0100)]
test/librbd/fsx: don't disable features for krbd
rbd_default_features is set in krbd suite, no need to hard-code this in
fsx (especially now when object-map, fast-diff and deep-flatten are all
supported).
Ronen Friedman [Sun, 5 Jan 2020 06:23:58 +0000 (08:23 +0200)]
crimson: fix non-standard C++ constructs in errorator.h
Fixing use patterns accepted by gcc, but frowned upon by Clang:
Put noexcept specifier after attributes specifiers (as
per the C++ standard $11.3.5)
Limit the use of a not-completely-defined class names to
within function bodies, per the standard ("A class is considered
a completely-defined object type (or complete type) at the
closing } of the class-specifier.
Within the class member-specification, the class is regarded as
complete within function bodies, default arguments, noexcept-specifiers,
and default member initializers (including such things in nested classes).
Otherwise it is regarded as incomplete within its own class member-specification.")
Kefu Chai [Sun, 5 Jan 2020 14:17:42 +0000 (22:17 +0800)]
crimson: do not use auto in param list of function prototype
src/crimson/net/Socket.cc:114:57: error: 'auto' not allowed in function
prototype
static inline seastar::future<> close_and_handle_errors(auto& out) {
^~~~
Kefu Chai [Sun, 5 Jan 2020 14:15:24 +0000 (22:15 +0800)]
crimson: do not capture unused variables
to silence warnings like
src/crimson/net/Socket.cc:93:41: warning: lambda capture 'this' is not
used [-Wunused-lambda-capture]
return in.read_exactly(bytes).then([this](auto buf) {
^~~~
Bernd Zeimetz [Sun, 5 Jan 2020 13:30:54 +0000 (14:30 +0100)]
os/bluestore/Blue(FS|Store): uint64_t alloc_size
Compiling on Debian's 32bit architectures failed with
<<PKGBUILDDIR>>/src/os/bluestore/BlueStore.cc:5539:37: error: no matching function for call to ‘p2align(size_t&, uint64_t&)’
5539 | total += p2align(len, alloc_size);
| ^
In file included from /<<PKGBUILDDIR>>/src/include/denc.h:42,
from /<<PKGBUILDDIR>>/src/include/encoding.h:40,
from /<<PKGBUILDDIR>>/src/include/compact_map.h:16,
from /<<PKGBUILDDIR>>/src/include/mempool.h:32,
from /<<PKGBUILDDIR>>/src/os/bluestore/BlueStore.h:36,
from /<<PKGBUILDDIR>>/src/os/bluestore/BlueStore.cc:25:
/<<PKGBUILDDIR>>/src/include/intarith.h:57:20: note: candidate: ‘template<class T> constexpr T p2align(T, T)’
57 | constexpr inline T p2align(T x, T align) {
| ^~~~~~~
/<<PKGBUILDDIR>>/src/include/intarith.h:57:20: note: template argument deduction/substitution failed:
/<<PKGBUILDDIR>>/src/os/bluestore/BlueStore.cc:5539:37: note: deduced conflicting types for parameter ‘T’ (‘unsigned int’ and ‘long long unsigned int’)
5539 | total += p2align(len, alloc_size);
As far as I understand it the available_freespace should at least be
able to return the same number as alloc_size, so we should use uint64_t
instead of size_t here, similar to 10a953afc8f803e50c96354470fb114b33e62599
Kefu Chai [Sat, 4 Jan 2020 04:05:50 +0000 (12:05 +0800)]
admin/build-doc: always install python3-* for build deps
since we've dropped the support of python36-*, i.e. python packages
provided by EPEL7 before RHEL7/CentOS7 included python3. as before the
inclusion of python3 as supported python3, python packages are named
python36-*. and they don't provide python3-*. so we had to install
python36-* explicitly. now that we are able to use the python3-*
packages, we can just install python3-*.
mon/OSDMonitor: Don't update mon cache settings if rocksdb is not used
Currently any update to mon cache config settings like 'mon_memory_target'
or 'rocksdb_cache_size' will cause a crash in case rocksdb and priority
cache manager is not being used.
If rocksdb (and therefore priority cache manager) is not being used, then
the update to the mon caches is ignored. Also, reduce the log levels of
some important log messages to help in debugging.
Matthew Oliver [Fri, 1 Nov 2019 01:02:39 +0000 (01:02 +0000)]
doc: Add a RGW swift auth note
Swift accounts are not like normal accounts, they are more akin to a
bank account that multile people could share. Or in the case of a cloud
it is usually mapped to the tenant.
Radosgw deals with this with a user and subuser, which is great, but a
little confusing. So this patch adds a note to those used to the Swift
API to make it more clear.
Sage Weil [Sun, 29 Dec 2019 02:31:33 +0000 (20:31 -0600)]
Merge PR #32415 into master
* refs/pull/32415/head:
include/cpp-btree: use inline variable to define btree_is_key_compare_to
include/cpp-btree: use std::conditional_t<>
include/cpp-btree: use static_assert()
include/interval_set: use interval_set when appropriate
include/interval_set: rename some types
include/cpp-btree: add emplace_hint()
Kefu Chai [Fri, 27 Dec 2019 15:40:53 +0000 (23:40 +0800)]
qa/tasks/vstart_runner: write string to StringIO
we use `six.StringIO` for stdout when writing output messages from
`self.subproc.communicate()`, and `six.StringIO` accepts strings, so we
need to decode the output before sending them to `six.StringIO`.
when compiled with the `_GLIBCXX_ASSERTIONS` macro defined. and recent
`redhat-rpm-config` adds `-D_GLIBCXX_ASSERTIONS` to
`__global_compiler_flags`, which is in turn included by `optflags`. and
`optflags` is pratically used everywhere.
but the second test instance created by
`rgw_log_entry::generate_test_instances` is created using the default
constructor of `rgw_log_entry`. if any of the member variable is created
using random bits in the heap, there is chance that the test fails like: