Or Ozeri [Thu, 19 Nov 2020 06:26:51 +0000 (08:26 +0200)]
librbd: fix crypto prepare_copyup to use new remap_extents api
This commit changes the crypto prepare_copyup implementation to correctly
translate object extents to image extents, via the remap_extents api.
Additionally, we fix relevant unit tests that call this api to correctly expect these calls.
Zac Dover [Wed, 18 Nov 2020 08:56:14 +0000 (18:56 +1000)]
doc/dev: update unit test declaration
This commit updates the text in the "How
Unit Tests Are Declared" section of
tests-unit-tests.rst. This commit breaks
long sentences into shorter sentences and
breaks a sentence into a bulleted list that
might reduce the reader's cognitive load.
Kefu Chai [Wed, 18 Nov 2020 10:03:55 +0000 (18:03 +0800)]
crimson/os: do not capture unused variables
silences warnings reported by clang iike:
btree_lba_manager.cc:439:50: warning: lambda capture 't' is not used [-Wunused-lambda-capture]
lba_node->get_node_meta().depth).safe_then([=, &t](LBANodeRef c) {
~~~^
1 warning generated.
Kefu Chai [Wed, 11 Nov 2020 10:36:22 +0000 (18:36 +0800)]
crimson/osd: add PG::with_clone_obc()
this method replaces `PG::get_or_load_clone_obc()`. so we can
with `seastar::with_lock()` to ensure that `lock.unlock()` is always
called when accessing clone obc.
Kefu Chai [Tue, 10 Nov 2020 13:03:02 +0000 (21:03 +0800)]
crimson/osd: add PG::with_head_obc()
this method replicates `PG::get_or_load_head_obc()`. but uses a different
way to ensure that the "lock" on obc is always released even if the
called func throws. it always guard the called func with a
`with_lock()`, so `lock.unlock()` is always called. the plan is to
replace `PG::get_or_load_head_obc()` with `PG::with_head_obc()` in
the following changes piecemeal.
Zac Dover [Tue, 17 Nov 2020 13:43:03 +0000 (23:43 +1000)]
doc/dev: update unit test 1 of 7
This commit updates the language at the beginning
of the Unit Test section of the developer guide.
The language in this edit is more grammatical than
it used to be, and should now reduce the reader's
cognitive load.
Zac Dover [Tue, 17 Nov 2020 14:02:32 +0000 (00:02 +1000)]
doc/dev: update unit tests 2 of 7
This commit updates the "What does 'make
check' mean" section of the "Unit Tests" chapter
of the Developer Guide. It makes the wording a
bit less editorial and attempts to reduce the
reader's cognitive load.
Patrick Donnelly [Tue, 17 Nov 2020 15:33:20 +0000 (07:33 -0800)]
Merge PR #35749 into master
* refs/pull/35749/head:
Update Release notes for multimds scrub
qa/cephfs: log-ignorelist scrub errors
qa/cephfs: Add more tests for multimds scrub
qa/cephfs: add tests for multimds scrub
qa/cephfs: update existing scrub test cases
mds: don't skip validating disk state of symlink
mds: abort/pause/resume scrubs in multiple mds
mds: track scrub status in multiple mds
mds: remove on_finish from {CInode,CDir}::scrub_info_t
Continuation: don't delete self while there are in-processing stages
mds: auth pin CInode when validating its disk state
mds: rdlock file/nest lock when accumulating stats of subtree dirfrags
mds: multiple mds scrub support
include/frag: add encode/decode functions for fragset_t
mds: remove object can't be scrubbed immediately from scrub stack
mds: prevent dirfrag scrub/fragment from running at the same time
mds: change scrub traverse from post-order to breadth-first search
mds: make both CInode and CDir as entities of scrub
mds: remove ScrubStack::scrubstack
Reviewed-by: Sidharth Anupkrishnan <sanupkri@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Kamoltat [Mon, 16 Nov 2020 08:52:12 +0000 (08:52 +0000)]
qa/mgr/test_progress: fix bug 48217
Fixes a failing test case regarding osd coming back
after being marked out. The old test case wasn't accounting
for a specific event, therefore this resulted in the failure.
The fix basically accounts for a specific event of osd being
marked in/out.
Or Ozeri [Mon, 2 Nov 2020 14:41:53 +0000 (16:41 +0200)]
librbd: add crypto image dispatch layer
This commit adds a crypto image dispatch layer, in addition to the existing crypto object dispatch layer.
The single purpose of this layer is to translate logical image offset to "on-disk" offsets,
given a crypto header which occupies the beginning of the image data.
This calculation is done via a new remap_extents api,
which is used in to wrap existing Striper translations between object and image extents.
Jan Fajerski [Thu, 17 Sep 2020 06:09:03 +0000 (02:09 -0400)]
pybind/snap_schedule: config option to allow minute granularity snaps
Thsi allows setting and scheduling snapshots with minute granularity. If
the option is unset, adding these will fail and scheduling for them will
be skipped.
Kevin Meijer [Sat, 14 Nov 2020 18:44:07 +0000 (19:44 +0100)]
mgr/dashboard: Disable sso without python3-saml
Removed the requirement for the python3-saml package when wanting to disable SSO for the dashboard, this is currently relevant since the official container that runs Ceph mgr does not have this package installed.
So when upgrading from an older, non-containerized version, you would be stuck using a non-functional dashboard.
This pull requests changes that and allows the ceph dashboard sso disable command without the requirement of the library so that we SSO can always be disabled again.
Fixes: https://tracker.ceph.com/issues/48237 Signed-off-by: Kevin Meijer <admin@kevinmeijer.nl>
Kefu Chai [Mon, 16 Nov 2020 07:21:19 +0000 (15:21 +0800)]
log/Log: cast typed pointer to integer before printing it
libfmt does not print pointer if it's not "void*", but "thread_t" is
defined as a pointer pointing to "struct pthread" on FreeBSD, so we need
to cast it either to "void*" or an integer". let's cast it to an integer
so it's more consistent with the output on Linux where thread_t is
defined as an integer.
this change addresses the FTBFS on FreeBSD likee:
In file included from /home/jenkins/workspace/ceph-master-compile/src/log/Log.cc:27:
In file included from /usr/local/include/fmt/format.h:44:
/usr/local/include/fmt/core.h:1043:20: error: invalid application of 'sizeof' to an incomplete type 'pthread'
static_assert(!sizeof(T), "formatting of non-void pointers is disallowed");
^~~~~~~~~
/usr/local/include/fmt/core.h:1259:32: note: in instantiation of function template specialization
'fmt::v7::detail::arg_mapper<fmt::v7::basic_format_context<std::__1::back_insert_iterator<fmt::v7::detail::buffer<char> >, char> >::map<pthread>' requested here
return arg_mapper<Context>().map(val);
^
/usr/local/include/fmt/core.h:1408:23: note: in instantiation of function template specialization 'fmt::v7::detail::make_arg<true,
fmt::v7::basic_format_context<std::__1::back_insert_iterator<fmt::v7::detail::buffer<char> >, char>, fmt::v7::detail::type::int_type, pthread *, 0>' requested here
data_{detail::make_arg<
^
/usr/local/include/fmt/core.h:1764:10: note: in instantiation of member function 'fmt::v7::format_arg_store<fmt::v7::basic_format_context<std::__1::back_insert_iterator<fmt::v7::detail::buffer<char>
>, char>, pthread *const, char *>::format_arg_store' requested here
return {args...};
^
/usr/local/include/fmt/core.h:1835:31: note: in instantiation of function template specialization 'fmt::v7::detail::make_args_checked<pthread *const &, char *, char [10], char>' requested here
const auto& vargs = detail::make_args_checked<Args...>(format_str, args...);
^
/home/jenkins/workspace/ceph-master-compile/src/log/Log.cc:376:23: note: in instantiation of function template specialization 'fmt::v7::format<char [10], pthread *const &, char *, char>' requested
here
_log_message(fmt::format(" {} / {}", pthread_id, (char*)pthread_name), true);
^
/usr/include/sys/_pthreadtypes.h:46:8: note: forward declaration of 'pthread'
struct pthread;
^
1 error generated.
Kiefer Chang [Mon, 11 May 2020 14:04:34 +0000 (22:04 +0800)]
mgr/dashboard: display OSD operational status
Frontend: display deleting state in the OSD ID column.
Backend: add `operational_status` to OSD:
- `working`: the OSD is in normal operation.
- `deleting`: the OSD had been scheduled for deleting.
- `unmanaged`: the OSD can't be managed by the Orchestrator.
Kefu Chai [Mon, 16 Nov 2020 07:33:42 +0000 (15:33 +0800)]
mgr/PyModuleRegistry: do not call PyEval_InitThreads() on python3.9
PyEval_InitThreads() and PyEval_ThreadsInitialized() are deprecated
since python3.9, and GIL is initialized by Py_Initialize() in python3.9.
so do not call them unless we are using python < 3.9.
see https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads
Kefu Chai [Mon, 16 Nov 2020 07:18:33 +0000 (15:18 +0800)]
log/Log: cast parameter of syslog() from unsigned to int
silences warning like:
../src/log/Log.cc:325:34: warning: field precision should have type 'int', but argument has type 'std::basic_string_view::size_type' (aka 'unsigned long') [-Wformat]
syslog(LOG_USER|LOG_INFO, "%.*s", s.size(), s.data());
~~^~ ~~~~~~~~
1 warning generated.
Kefu Chai [Mon, 16 Nov 2020 06:58:22 +0000 (14:58 +0800)]
message: mark message classes "final"
silences warnings like:
src/messages/MOSDPGUpdateLogMissingReply.h:74:34: warning: class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class]
~MOSDPGUpdateLogMissingReply() final {}
^
../src/messages/MOSDPGUpdateLogMissingReply.h:21:7: note: mark 'MOSDPGUpdateLogMissingReply' as 'final' to silence this warning
class MOSDPGUpdateLogMissingReply : public MOSDFastDispatchOp {
^
1 warning generated.