--test-map-pgs mode allows to map all pgs from either all pools or just
one pool. Mention it in usage output.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Commit 7f1b12f2ef ("osdmaptool: add --test-map-pgs mode") broke
--pool for --test-map-object mode. Fix it, and improve --pool option
handling for both modes while at it (report strict_strtol() errors,
check if specified pool exists).
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Irritatingly, using 0 binds to int and generates warnings
if the thing we're checking is unsigned, so we have to be
explicit.
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
If the crush ruleset is found in pending, do not goto reply because it
does not exist yet. Wait for the pending proposal (and the ruleset) to
be accepted and then only return that it exists.
revert 4b687ba673
Signed-off-by: Loic Dachary <loic@dachary.org>
Basic tests and a test that create the conditions where an OSDMap
is pending with a ruleset that is not yet in the OSDMap. An attempt to
create a rule by the same name will return success and not create it again.
Signed-off-by: Loic Dachary <loic@dachary.org>
The crush rule name is made an optional first argument. If not provided, it
defaults to dumping all rules.
Signed-off-by: Loic Dachary <loic@dachary.org>
And it is consistent with the above. Also use a slightly different
string to allow the caller to differentiate between the two cases.
Signed-off-by: Loic Dachary <loic@dachary.org>
And implement dump_rules() using dump_rule(). The indentiation and
variable names are intentionaly left as is to not confuse code being
moved around and the code changes.
Signed-off-by: Loic Dachary <loic@dachary.org>
Use the admin socket to create the conditions by which a pool creation
is made to wait for the next paxos proposal because the required crush
ruleset is pending.
It replaces a fragile time sensitive workaround that could fail because
of race conditions. It also has the benefit of increase the speed of the
test because there is no need to wait for a long time just to accomodate
the slowest machines.
Signed-off-by: Loic Dachary <loic@dachary.org>
It provides a developer path allowing functional tests to modify the
pending OSDMap without triggering a PaxosProposal.
It can be used as follows:
echo '{"prefix":"osdmonitor_prepare_command","prepare":"osd crush tunables","profile":"bobtail"}' | nc -U out/mon.a.asok
It will transform the command into:
{"prefix":"osd crush tunables","profile":"bobtail"}
and feed it to OSDMonitor::prepare_command_impl(). The pending OSDMap won't
be proposed because it short circuit PaxosService::dispatch. It will,
however, be proposed next time PaxosService::dispatch() gets a chance.
It cannot be used via the ceph command line.
Signed-off-by: Loic Dachary <loic@dachary.org>
When this flag is true, the mon is expected to provide functionalities
that are for developer oriented debug purposes only. It is meant to
be used by the developer and not the system administrator, because it
would allow a non-developer to break things in ways that would be very
difficult to diagnose. It should probably not be documented.
Signed-off-by: Loic Dachary <loic@dachary.org>
So that it is possible to call prepare_command without a session
established and a cmdmap that has already been parsed.
Signed-off-by: Loic Dachary <loic@dachary.org>
setxattr() should remove xattr if parameter 'value' is NULL. To
distinguish it from the zero-length value case, introduce a new
flag CEPH_XATTR_REMOVE for the setxattr request.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Open request created by ceph_atomic_open() wants dentry trace. But
the corresponding code is missing in Server::do_open_truncate().
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Warn on legacy tunables, not on non-optimal tunables. Optimal is a moving
target, but it is really the legacy defaults that we want to push people
off of.
Fixes: #7399
Signed-off-by: Sage Weil <sage@inktank.com>
The binaries file name have changed and need to be updated in the
packaging files for deb and rpm. Fix a few leftovers as well.
Fixing 1a588f18ba
Signed-off-by: Loic Dachary <loic@dachary.org>
Update inode format version to 10, treat any previously created
inode as no backtrace. When inode with no backtrace is modified,
force update its backtrace.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>