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>
This means parsing argv only once now, so pass arg lists to
new_style_command(). A little cleanup/commenting too.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
New parsing function to extract any known arguments from a vector
and return any unknowns; useful for ceph CLI to allow librados
first dibs on arguments so it doesn't have to reproduce the
argument recognition
Signed-off-by: Dan Mick <dan.mick@inktank.com>
MDSMonitor: check for and handle bad maxmds get
cmdparse.h: Use gcc demangler to print bad boost::variant typenames,
add backtrace in case of bad boost::variant get
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reduce scope of 'CInode *in' since it's the way it's done already
in other paths of the function.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix "Variable 'r' is assigned a value that is never used." issue from
cppcheck. Check return value and print warning if in verbose mode.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix some cases of "(performance) Variable 'err' is reassigned a
value before the old one has been used." issues from cppcheck.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>