From: Kefu Chai Date: Tue, 19 Nov 2019 02:57:38 +0000 (+0800) Subject: mon: annotate more tell commands X-Git-Tag: v15.1.0~359^2~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0188b850f0363f81d08dd4eeaae7866726d76847;p=ceph-ci.git mon: annotate more tell commands currently, the only consumer of the annotated tell commands is `Monitor::handle_tell_command()`, which check the cap of the client against the required permission of the command to be executed. if the command is not annotated, it's assumed that the command requires "mon rwx". because the asock commands are registered at runtime using `AdminSocket::register_command()`, and there are some asock commands are shared by all ceph applications using asock facility, without a proper machinary, we cannot annotate all of them and populate this annotated commands to all these ceph applications. so, at this moment, only a subset of asock commands are annotated. Signed-off-by: Kefu Chai --- diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index 07740542a87..13ed7b16acf 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -1251,6 +1251,36 @@ COMMAND_WITH_FLAG("smart name=devid,type=CephString,req=false", COMMAND_WITH_FLAG("mon_status", "report status of monitors", "mon", "r", FLAG(NOFORWARD)|FLAG(HIDDEN)) COMMAND_WITH_FLAG("heap " \ - "name=heapcmd,type=CephChoices,strings=dump|start_profiler|stop_profiler|release|stats", \ + "name=heapcmd,type=CephChoices,strings=dump|start_profiler|stop_profiler|release|stats " + "name=value,type=CephString,req=false", "show heap usage info (available only if compiled with tcmalloc)", \ "mon", "rw", FLAG(NOFORWARD)|FLAG(HIDDEN)) +COMMAND_WITH_FLAG("sync_force " \ + "name=validate,type=CephChoices,strings=--yes-i-really-mean-it,req=false", + "force sync of and clear monitor store", + "mon", "rw", FLAG(NOFORWARD)|FLAG(HIDDEN)) +COMMAND_WITH_FLAG("add_bootstrap_peer_hint " + "name=addr,type=CephIPAddr", + "add peer address as potential bootstrap " + "peer for cluster bringup", + "mon", "rw", FLAG(NOFORWARD)|FLAG(HIDDEN)) +COMMAND_WITH_FLAG("add_bootstrap_peer_hintv " + "name=addrv,type=CephString", + "add peer address vector as potential bootstrap " + "peer for cluster bringup", + "mon", "rw", FLAG(NOFORWARD)|FLAG(HIDDEN)) +COMMAND_WITH_FLAG("quorum enter ", + "force monitor back into quorum", + "mon", "rw", FLAG(NOFORWARD)|FLAG(HIDDEN)) +COMMAND_WITH_FLAG("quorum exit", + "force monitor out of the quorum", + "mon", "rw", FLAG(NOFORWARD)|FLAG(HIDDEN)) +COMMAND_WITH_FLAG("ops", + "show the ops currently in flight", + "mon", "r", FLAG(NOFORWARD)|FLAG(HIDDEN)) +COMMAND_WITH_FLAG("sessions", + "list existing sessions", + "mon", "r", FLAG(NOFORWARD)|FLAG(HIDDEN)) +COMMAND_WITH_FLAG("dump_historic_ops", + "dump_historic_ops", + "mon", "r", FLAG(NOFORWARD)|FLAG(HIDDEN))