Skip to content

Commit

Permalink
mon: Monitor: use 'ceph mon metadata' instead of 'ceph mon_metadata'
Browse files Browse the repository at this point in the history
'ceph mon_metadata' was added still during this dev cycle, so there is
no need to deprecate it first.

Fixes: ceph#11545

Signed-off-by: Joao Eduardo Luis <[email protected]>
  • Loading branch information
jecluis committed Jul 16, 2015
1 parent 955dced commit 038452e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions PendingReleaseNotes
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ v9.0.4
* 'ceph scrub', 'ceph compact' and 'ceph sync force are now DEPRECATED. Users
should instead use 'ceph mon scrub', 'ceph mon compact' and
'ceph mon sync force'.

* 'ceph mon_metadata' should now be used as 'ceph mon metadata'. There is no
need to deprecate this command (same major release since it was first
introduced).
2 changes: 1 addition & 1 deletion qa/workunits/cephtool/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ function test_mon_misc()
ceph log "$mymsg"
ceph_watch_wait "$mymsg"

ceph mon_metadata a
ceph mon metadata a
ceph node ls
}

Expand Down
6 changes: 3 additions & 3 deletions src/mon/MonCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,6 @@ COMMAND("report name=tags,type=CephString,n=N,req=false", \
"mon", "r", "cli,rest")
COMMAND("quorum_status", "report status of monitor quorum", \
"mon", "r", "cli,rest")
COMMAND("mon_metadata name=id,type=CephString",
"fetch metadata for mon <id>",
"mon", "r", "cli,rest")

COMMAND_WITH_FLAG("mon_status", "report status of monitors", "mon", "r", "cli,rest",
FLAG(NOFORWARD))
Expand Down Expand Up @@ -291,6 +288,9 @@ COMMAND_WITH_FLAG("mon sync force " \
"force sync of and clear monitor store", \
"mon", "rw", "cli,rest", \
FLAG(NOFORWARD))
COMMAND("mon metadata name=id,type=CephString",
"fetch metadata for mon <id>",
"mon", "r", "cli,rest")


/*
Expand Down
7 changes: 4 additions & 3 deletions src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void Monitor::do_admin_command(string command, cmdmap_t& cmdmap, string format,
args = "[" + args + "]";

bool read_only = (command == "mon_status" ||
command == "mon_metadata" ||
command == "mon metadata" ||
command == "quorum_status");

(read_only ? audit_clog->debug() : audit_clog->info())
Expand Down Expand Up @@ -2700,7 +2700,8 @@ void Monitor::handle_command(MMonCommand *m)
*/
prefix != "mon compact" &&
prefix != "mon scrub" &&
prefix != "mon sync force") {
prefix != "mon sync force" &&
prefix != "mon metadata") {
monmon()->dispatch(m);
return;
}
Expand Down Expand Up @@ -2887,7 +2888,7 @@ void Monitor::handle_command(MMonCommand *m)
rdata.append(ds);
rs = "";
r = 0;
} else if (prefix == "mon_metadata") {
} else if (prefix == "mon metadata") {
string name;
cmd_getval(g_ceph_context, cmdmap, "id", name);
int mon = monmap->get_rank(name);
Expand Down

0 comments on commit 038452e

Please sign in to comment.