The accessor returns a reference. Instead of taking+dropping it each
time, take one ref in Monitor ctor and release it in the dtor.
Signed-off-by: Sage Weil <sage@inktank.com>
This was initialized in (one of) the ctor(s), but not encoded/decoded,
and not used. Remove it. This makes valgrind a happy.
Signed-off-by: Sage Weil <sage@inktank.com>
These fields are no longer used. We already bumped the mon internal
protocol in 5d7dd5ab67922b10351c3c7f57865d2c3e6815ac, so we can safely
change these.
Fixes: #4809
Signed-off-by: Sage Weil <sage@inktank.com>
trunc was getting size_t instead of uint64_t, leading to bad results
in 32-bit environments. Explicitly cast to the desired type
everywhere, so it's clear the correct type is being used.
Fixes: #5233
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
librados clients, particularly the ceph tool, need to be able
to specify a full 'name'; rados_create enforced 'client.<param>'
with no workaround. New interface. Python Rados().__init__ selects
appropriate create function depending on whether name or id is
supplied.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
The filestore requires hobjects to be globally unique.
Fixes: #5240
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
uint64_t is passed in, but int was extracted. This fails on 32-bit builds.
Fixes: #5220
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 17029b270d)
The tests covers 100% of the LOC of merge_old_entry. It is broken down
in 13 cases to enumerate all the situations it must address. Each case
is isolated in a independant code block where the conditions are
reproduced. For instance:
info.last_backfill = hobject_t();
info.last_backfill.hash = 1;
oe.soid.hash = 2;
creates the conditions where merge_log_entry is expected to silently
ignore entries containing an object that is greater than
last_backfill.
PGLogTest is derived from PGLog to get access to the protected members.
Signed-off-by: Loic Dachary <loic@dachary.org>
Many JSON commands (osd dump, et. al.) used to print a status
line first before the actual output; this has been fixed, but there
are scripts/tools/etc. that expect it. A simple compatibility hack
is to output a blank line, which won't confuse properly-written
JSON parsers, but will allow the tools-with-workarounds to continue
to work.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
- make base class valid() do useful work
- remove valid from CephPoolname; pool need not exist for create
- add --user as alias for --id
- remove vestige of special --keyring handing
- be sure childargs is an empty list rather than None
- remove -- from childargs if present (to stop interpreting -- args)
- handle connection timeout cleanly
Signed-off-by: Dan Mick <dan.mick@inktank.com>
dump needed to default to format plain, not json
dump_stuck was not doing format = plain correctly (coredumping)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
cmd_vartype are not all strings, and need a type-variant function
to turn them into strings for authorization against caps. Use
boost::apply_visitor to get this behavior.
Signed-off-by: Dan Mick <dan.mick@inktank.com>