Remove a context from peer_ack_ctxs before completing to avoid a race
with a listener inserting a new one.
Fixes: http://tracker.ceph.com/issues/36683
Signed-off-by: Mykola Golub <mgolub@suse.com>
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.
Signed-off-by: John Spray <john.spray@redhat.com>
This relied on a behaviour where positional
arguments could be omitted if the subsequent
argument was of a different type.
This was pretty weird, and in any case the reweight-by-utilization
command is likely to go away soon.
Signed-off-by: John Spray <john.spray@redhat.com>
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.
Signed-off-by: John Spray <john.spray@redhat.com>
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.
Signed-off-by: John Spray <john.spray@redhat.com>
Add some docstrings to functions, remove some
dead code and places where e.g. dicts were used
unncessary.
Signed-off-by: John Spray <john.spray@redhat.com>
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.
Signed-off-by: John Spray <john.spray@redhat.com>
The loop was iterating up to but not including the
rbegin() entry.
Also remove a spurious derr << "bar"
Fixes: http://tracker.ceph.com/issues/36679
Signed-off-by: John Spray <john.spray@redhat.com>
* refs/pull/24747/head:
client: add new routine to get fscid from a ceph_mount
Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
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.
Signed-off-by: Kefu Chai <kchai@redhat.com>
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
Signed-off-by: Kefu Chai <kchai@redhat.com>
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.
Signed-off-by: Kefu Chai <kchai@redhat.com>
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.
Signed-off-by: Kefu Chai <kchai@redhat.com>