diff --git a/PendingReleaseNotes b/PendingReleaseNotes index b532a140d6d..8b18e93e1cf 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -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). diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index bd5187a8323..7c1bebc406b 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -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 } diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index 473c09a3411..e4da778cbd3 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -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 ", - "mon", "r", "cli,rest") COMMAND_WITH_FLAG("mon_status", "report status of monitors", "mon", "r", "cli,rest", FLAG(NOFORWARD)) @@ -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 ", + "mon", "r", "cli,rest") /* diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index df9e200993f..19e8ef2088a 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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()) @@ -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; } @@ -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);