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.
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.
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.
Kefu Chai [Mon, 16 Nov 2020 06:04:15 +0000 (14:04 +0800)]
cmake: enable CMP0074
to search prefixes specified by the <PackageName>_ROOT CMake
variable and the <PackageName>_ROOT environment variable. find_package()
in CMake 3.12 started to use these prefixes if it is enabled.
Yan, Zheng [Fri, 19 Jun 2020 02:52:52 +0000 (10:52 +0800)]
mds: track scrub status in multiple mds
Scrubs are always initialized from mds.0. So mds.0 can ensure that scrub
tags are unique globally. mds.0 periodically gathers scrubs running in
itself and in other mds. A scrub is finished only if it's not running in
any mds.
Yan, Zheng [Fri, 19 Jun 2020 02:37:01 +0000 (10:37 +0800)]
mds: remove on_finish from {CInode,CDir}::scrub_info_t
A CInode/CDir is scrubbed no longer means corresponding subtree is fully
scrubbed. The on_finish in {CInode,CDir}::scrub_info_t become useless.
This patch also removes code that flushs journal if scrub has repaired
anything. Later patch will add the code back at different place.
Simon Gao [Fri, 15 May 2020 09:19:14 +0000 (17:19 +0800)]
mds: change scrub traverse from post-order to breadth-first search
After using breadth-first search, scrubing a dir inode does not need
to wait until all of its descendant difrags/inodes are scrubbed. This
simplfies scrub code a lot. The downside is that a scrubbed dir inode
no longer implies corresponding subtree has been fully scrubbed. It
makes later scrub (without force option) less efficient.
Signed-off-by: Simon Gao <simon29rock@gmail.com> Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Yan, Zheng [Sat, 2 May 2020 08:24:17 +0000 (16:24 +0800)]
mds: make both CInode and CDir as entities of scrub
Making CDir as entity of scrub is preparetion for scrubbing across
multiple mds. When subtree bound is encountered, scrub should be
forwarded to subtree's auth mds. The auth mds adds CDir to scrub stack.
Signed-off-by: Simon Gao <simon29rock@gmail.com> Signed-off-by: "Yan, Zheng" <zyan@redhat.com>