John Spray [Wed, 31 Oct 2018 16:59:20 +0000 (12:59 -0400)]
ceph_argparse: introduce CephBool arguments
This replaces use of CephChoices for cases like
--yes-i-really-really-mean-it.
It's a relatively invasive change, because both
client and server need to handle backward compatibility:
- Clients are easy, they just cope with the server's
use of CephChoices/CephString with a few special case
strings to recognise --yes-i-really-mean-it and similar
- Servers are harder, they have to convert CephBool arguments
into a similar CephChoices argument that older clients will
understand. This involves propagating feature flags into
some code paths that couldn't see them before.
John Spray [Tue, 9 Oct 2018 13:09:56 +0000 (09:09 -0400)]
mon: remove dead "cluster_snap" command
This had existed in a disabled state (by having an empty
string for the cli/rest field in the command definition)
for a long time. Now that that field is gone, we don't
have a concept of "disabled" commands any more, so
let's just clean up this loose end.
John Spray [Fri, 28 Sep 2018 14:40:23 +0000 (10:40 -0400)]
pybind: enable --keyword=arguments in ceph_argparse
This is a simple implementation that treats anything
that matches the "--X=Y" pattern as separate from
positional arguments.
This works well for optional arguments. Mandatory
arguments still need to be specified positionally,
or the parsing code will think the command's
argument description has not been satisfied.
John Spray [Thu, 27 Sep 2018 14:37:36 +0000 (10:37 -0400)]
common: remove unused 'avail' field from commands
This was introduced for the now-removed ceph-rest-api
gateway. It enabled limiting certain commands
to be CLI-only or rest-only, but in practice almost
everything just said "cli,rest" here.
Now that ceph-rest-api is gone, let's remove this
field.
The CLI client code already tolerated the absence
of this field, so older CLI clients will not mind.
Kefu Chai [Thu, 1 Nov 2018 03:52:07 +0000 (11:52 +0800)]
rpm,deb: package libceph-common.so.* not libceph-common.so*
be more explicit on what we are packaging. because only
libceph-common.so.${soversion} will be packaged, since libceph-common.so
won't be installed by cmake anymore.
Kefu Chai [Mon, 29 Oct 2018 07:34:52 +0000 (15:34 +0800)]
qa: update test_envlibrados_for_rocksdb.sh for libradospp split
include a patch so rocksdb can use libradospp instead of librados. will
upstream the patch and make it work for both pre-nautilus librados and
nautilus libradospp
Kefu Chai [Tue, 9 Jan 2018 09:19:28 +0000 (17:19 +0800)]
librados: move C++ APIs into libradospp
the goal is to decouple C++ API from C API, and to version them
differently, as they are targeting different consumers.
this allows us to change the C++ API and bumping up its soversion
without requiring consumer to recompile the librados client for
using the new librados. in this way, C++ API can move faster than
C API. for example, if bufferlist interface is changed for better
performance, and this breaks existing API/ABI, we can bump up
the C++ library's soversion, and and the C library's version unchanged
but ship the new librados's C binding. so the librados client linked
against librados's C library will be able to take advantage of
the improvement in C++ library. while the librados client
linked against C++ library won't break at runtime due to unresolved
symbol or changed structure layout.
this is massive change, the genereal idea is to
* split librados.cc into two source files: librados_c.cc and
librados_cxx.cc, the former for implementing C APIs, the later
for C++ APIs.
* extract the C++ API in librados into librados-cxx, the library
name will be libradospp. but we can change it before nautilus
is released.
* link these librados libraries with static libraries which it
depends on, so "-Wl,--exclude-libs,ALL" link flags can help
hide the non-public symbols.
* extract the tests exercising librados' C++ API into a different
source file named *_cxx.cc. for instance, to move the C++ tests
in aio.cc into aio_cxx.cc
* extract the shared helper functions which do not use any librados
or librados-cxx APIs into test_shared{.cc,h}. the "shared" here
means, *shared* by C++ and C tests.
* extract the test fixtures, i.e., the subclasses of testing::Test,
for testing C++ APIs into testcase_cxx.cc.
* update qa/workunits/rados/test.sh accordingly to add the splitted
tests
* update the consumers of librados to link against librados-cxx
instead, if they are using the C++ API.
Kefu Chai [Wed, 24 Oct 2018 07:35:05 +0000 (15:35 +0800)]
librados: move get_inconsistent_pgs() into RadosClient
so we don't need parse the pg string and render it again for librados C
API.
the downside of this change is that, get_inconsistent_pgs() could be
implemented using RadosClient, instead be *in* it. but before we have
a place for the helper functions for these higher-level functions,
RadosClient is a good place for hosting them.
Sage Weil [Tue, 30 Oct 2018 20:09:45 +0000 (15:09 -0500)]
Merge PR #24809 into master
* refs/pull/24809/head:
os/bluestore: omit redundant '/' in OSD path for ceph-bluestore-tool if
os/bluestore: improve error handling for migrate ops in
qa/standtalone/osd-bluefs-volume-ops: remove redundant code.
Sage Weil [Mon, 29 Oct 2018 13:46:43 +0000 (08:46 -0500)]
Merge PR #24686 into master
* refs/pull/24686/head:
os/bluestore: show compress and buffered from WriteContext
os/bluestore: fix rename race with trim on replacement onode at old name
Reviewed-by: Jianpeng Ma <jianpeng.ma@intel.com> Reviewed-by: Igor Fedotov <ifedotov@suse.com>
Sage Weil [Mon, 29 Oct 2018 13:36:34 +0000 (08:36 -0500)]
Merge PR #24787 into master
* refs/pull/24787/head:
Merge PR #24796 into nautilus
osd: fix heartbeat_reset unlock
Merge PR #24780 into nautilus
Merge PR #24761 into nautilus
Merge PR #24651 into nautilus
osd: fix race between op_wq and context_queue
test: Make sure kill_daemons failure will be easy to find
test: Add flush_pg_stats to make test more deterministic
Sage Weil [Sun, 28 Oct 2018 14:41:31 +0000 (09:41 -0500)]
Merge PR #24688 into master
* refs/pull/24688/head:
common: make ceph_abort store same crash info as ceph_assert
global: store assert msg in global and dump to crash meta
pybind/mgr: make 'ceph crash ls' output sorted list
log: don't clear ring when dump_recent is called
ceph-crash: make clear to user that 'posted' should be directory
Sage Weil [Sun, 28 Oct 2018 14:39:50 +0000 (09:39 -0500)]
Merge PR #24780 into master
* refs/pull/24780/head:
osd: take heartbeat_lock before checking for session
Merge PR #24725 into nautilus
qa/tasks/qemu: use unique clone directory to avoid race with workunit
mds: add missing mds_lock