mirror of
https://github.com/ceph/ceph
synced 2025-01-12 22:16:05 +00:00
mon: drop "mon compact" command
quote from Sage's reply > This is a mon-specific command--it doesn't make sense as a CLI command > for the entire cluster--it only makes sense as a command to tell a > specific monitor. Like ``ceph tell mon.a compact``. Back when Joao > did #4595 these commands were all mixed together and putting it under > 'ceph mon ...' made sense, but now you're specifially sending it to a > mon, so the 'mon' part of the command is redundant. so let's drop "mon compact" in favor of "compact" command Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
e9a5ce0897
commit
acbd038522
@ -2576,17 +2576,13 @@ function test_mon_ping()
|
||||
|
||||
function test_mon_deprecated_commands()
|
||||
{
|
||||
# current DEPRECATED commands are:
|
||||
# ceph compact
|
||||
# current DEPRECATED commands are marked with FLAG(DEPRECATED)
|
||||
#
|
||||
# Testing should be accomplished by setting
|
||||
# 'mon_debug_deprecated_as_obsolete = true' and expecting ENOTSUP for
|
||||
# each one of these commands.
|
||||
|
||||
ceph tell mon.* injectargs '--mon-debug-deprecated-as-obsolete'
|
||||
expect_false ceph compact 2> $TMPFILE
|
||||
check_response "\(EOPNOTSUPP\|ENOTSUP\): command is obsolete"
|
||||
|
||||
expect_false ceph config-key list 2> $TMPFILE
|
||||
check_response "\(EOPNOTSUPP\|ENOTSUP\): command is obsolete"
|
||||
|
||||
|
@ -251,10 +251,6 @@ COMMAND("node ls "
|
||||
/*
|
||||
* Monitor-specific commands under module 'mon'
|
||||
*/
|
||||
COMMAND_WITH_FLAG("mon compact",
|
||||
"cause compaction of monitor's leveldb/rocksdb storage",
|
||||
"mon", "rw",
|
||||
FLAG(NOFORWARD))
|
||||
COMMAND_WITH_FLAG("mon scrub",
|
||||
"scrub the monitor stores",
|
||||
"mon", "rw",
|
||||
|
@ -418,7 +418,7 @@ int Monitor::do_admin_command(
|
||||
cmd_vec.push_back(val);
|
||||
}
|
||||
ceph_heap_profiler_handle_command(cmd_vec, out);
|
||||
} else if (command == "compact" || command == "mon compact") {
|
||||
} else if (command == "compact") {
|
||||
dout(1) << "triggering manual compaction" << dendl;
|
||||
auto start = ceph::coarse_mono_clock::now();
|
||||
store->compact_async();
|
||||
@ -3398,10 +3398,8 @@ void Monitor::handle_command(MonOpRequestRef op)
|
||||
|
||||
if (module == "mon" &&
|
||||
/* Let the Monitor class handle the following commands:
|
||||
* 'mon compact'
|
||||
* 'mon scrub'
|
||||
*/
|
||||
prefix != "mon compact" &&
|
||||
prefix != "mon scrub" &&
|
||||
prefix != "mon metadata" &&
|
||||
prefix != "mon versions" &&
|
||||
|
Loading…
Reference in New Issue
Block a user