Kefu Chai [Wed, 3 May 2017 08:21:52 +0000 (16:21 +0800)]
test/compressor: disable isal tests if not available
the isal-zlib compressor plugin is not supported on non-intel archs, and
if the user does not have a capable yasm compiler, neither will he/she
get this plugin.
Jos Collin [Tue, 2 May 2017 10:05:09 +0000 (15:35 +0530)]
dmclock: error: ‘function’ in namespace ‘std’ does not name a template type
The following error appears during make:
In file included from ceph/src/dmclock/support/src/run_every.cc:10:0:
ceph/src/dmclock/support/src/run_every.h:30:10: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<void()> body;
^~~~~~~~
ceph/src/dmclock/support/src/run_every.h:46:12: error: ‘std::function’ has not been declared
std::function<void()> _body) :
^~~~~~~~
ceph/src/dmclock/support/src/run_every.h:46:20: error: expected ‘,’ or ‘...’ before ‘<’ token
std::function<void()> _body) :
^
ceph/src/dmclock/support/src/run_every.h: In constructor ‘crimson::RunEvery::RunEvery(D, int)’:
ceph/src/dmclock/support/src/run_every.h:48:7: error: class ‘crimson::RunEvery’ does not have any field named ‘body’
body(_body)
^~~~
ceph/src/dmclock/support/src/run_every.h:48:12: error: ‘_body’ was not declared in this scope
body(_body)
^~~~~
ceph/src/dmclock/support/src/run_every.cc: In member function ‘void crimson::RunEvery::run()’:
ceph/src/dmclock/support/src/run_every.cc:70:7: error: ‘body’ was not declared in this scope
body();
^~~~
ceph/src/dmclock/support/src/run_every.cc:70:7: note: suggested alternative: ‘bool’
body();
^~~~
bool
Kefu Chai [Tue, 2 May 2017 01:34:53 +0000 (09:34 +0800)]
OSD: stop mgrc earlier in shutdown()
it's better this way, as MgrClient is more like an internal consumer
of the services offered by OSD, instead of service privider. it could
prevent future problem if we can stop it earlier in the shutdown
process.
see also: http://tracker.ceph.com/issues/19638 Signed-off-by: Kefu Chai <kchai@redhat.com>
Jason Dillaman [Tue, 2 May 2017 01:06:19 +0000 (21:06 -0400)]
cls_rbd: default initialize snapshot namespace for legacy clients
Creating a snapshot on >=Kraken OSDs using <=Jewel clients can result
in an improperly initialized snapshot namespace. As a result, attempting
to remove the snapshot using a >=Kraken client will result in an -EINVAL
error.
Fixes: http://tracker.ceph.com/issues/19413 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Sage Weil [Mon, 1 May 2017 20:10:44 +0000 (15:10 -0500)]
osdc/Objecter: fix pool dne corner case
We have a request that is queued before a pool exists, there is one
epoch where it exists, and then the pool disappears again. The two maps
are processed at the same time. For the first we set needs_resend, map to
an osd, and remove from the homeless sessin. For the second, the pool
dne, we set osd back to -1, and send a map check request. Finally,
handle_osd_maps scans need_resend, sees the pool dne, and removes from
need_resend. The difference from the "usual" case is that we are neither
on the need_resend list nor on the homeless session.
Fix this by concluding immediately that the pool existed (briefly) and
then no longer exists.
Fixes: http://tracker.ceph.com/issues/19552 Signed-off-by: Sage Weil <sage@redhat.com>
Kefu Chai [Mon, 1 May 2017 15:48:51 +0000 (23:48 +0800)]
mon/OSDMonitor: update creating_pgs using pending_creatings
* without this change, in OSDMonitor::update_pending_pgs(), creating_pgs
is updated directly without lock, and the change will be overwritten
with pending changes eventually. so we should update it using
pending_creatings
* also, should acquire the lock in OSDMonitor::send_pg_creates() when
reading creating_pgs_by_osd_epoch and createing_pgs.
crush: pass by const reference to kill compiling error
i have following error when compiling with gcc-6 on armhf
ceph/src/crush/CrushCompiler.cc: In member function 'int
CrushCompiler::decompile(std::ostream&)':
ceph/src/crush/CrushCompiler.cc:462:45: error: invalid initialization of
non-const reference of type 'std::pair<const long unsigned int,
crush_choo
se_arg_map>&' from an rvalue of type 'std::pair<const long unsigned int,
crush_choose_arg_map>'
int ret = decompile_choose_args(i, out);
Jos Collin [Mon, 1 May 2017 03:37:43 +0000 (09:07 +0530)]
test: silence warning from -Wsign-compare
The following warning appears during make:
In file included from ceph/src/test/librados/TestCase.h:9:0,
from ceph/src/test/librados/c_read_operations.cc:10:
ceph/src/googletest/googletest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = long unsigned int]’:
ceph/src/googletest/googletest/include/gtest/gtest.h:1421:23: required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = long unsigned int; bool lhs_is_null_literal = false]’
ceph/src/test/librados/c_read_operations.cc:685:3: required from here
ceph/src/googletest/googletest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
~~~~^~~~~~
otherwise the bluestore tests will fail with failures like
qa/workunits/cephtool/test.sh:1343: test_mon_osd_pool: ceph osd pool set ec_test allow_ec_overwrites true
Error EINVAL: pool must only be stored on bluestore for scrubbing to work: osd.1 uses filestore
qa/workunits/cephtool/test.sh:1343: test_mon_osd_pool: return 1
John Spray [Wed, 5 Apr 2017 23:58:36 +0000 (19:58 -0400)]
mgr: get fresh maps on second load of Mgr
I think we got away with this when Client::init was
re-initialising the MonClient, but now that (bogus)
stuff isn't happening any more as Client doesn't
init/teardown monc/objecter itself.
John Spray [Sun, 5 Mar 2017 15:38:36 +0000 (10:38 -0500)]
mgr: improve handle_command
Run the python module calls in a finisher so that
they don't block the daemonserver lock and so that
they can call back into mgr stuff if they need to.
Fix passing through commands to python modules, this
was giving EINVAL because only things with a MgrCommand
were getting let in.
Also fix get_command_descriptions, which was not
including the output of the formatter in the response.
John Spray [Sun, 5 Mar 2017 15:38:36 +0000 (10:38 -0500)]
mon: don't enqueue periodic digest if one is already waiting
This was causing mons to send far more digest messages than
should have been sent. Could have been responsible for
reports of very high CPU consumption on the mgr daemon.
Fixes: http://tracker.ceph.com/issues/18994 Signed-off-by: John Spray <john.spray@redhat.com>
John Spray [Sun, 5 Mar 2017 15:27:46 +0000 (10:27 -0500)]
common/finisher: use distinct lock names
Two Finishers should not be considered equivalent
for lockdep purposes: for example in mgr we have
our in-mgr Finisher, and then any finishers that
might be in libraries called by modules.