diff options
author | Sage Weil <sage@newdream.net> | 2017-06-02 17:20:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-02 17:20:27 +0200 |
commit | cd4acd8d010eb4911d1e1352e46897164125e827 (patch) | |
tree | 0651739898a23d651334340df7664d1a94898050 | |
parent | Merge pull request #15395 from liewegas/wip-log-entity (diff) | |
parent | osd/mon/mds: unify usage text, always use stdout (diff) | |
download | ceph-cd4acd8d010eb4911d1e1352e46897164125e827.tar.xz ceph-cd4acd8d010eb4911d1e1352e46897164125e827.zip |
Merge pull request #15176 from SUSE/wip-mgr-fix-help
mgr,osd: ceph-mgr --help, unify usage text of other daemons
Reviewed-by: Kefu Chai <kchai@redhat.com>
-rw-r--r-- | src/ceph_mds.cc | 2 | ||||
-rw-r--r-- | src/ceph_mgr.cc | 10 | ||||
-rw-r--r-- | src/ceph_mon.cc | 39 | ||||
-rw-r--r-- | src/ceph_osd.cc | 2 | ||||
-rw-r--r-- | src/mgr/MgrStandby.h | 1 |
5 files changed, 29 insertions, 25 deletions
diff --git a/src/ceph_mds.cc b/src/ceph_mds.cc index 7c2a9503478..b6cff8348eb 100644 --- a/src/ceph_mds.cc +++ b/src/ceph_mds.cc @@ -53,7 +53,7 @@ using namespace std; static void usage() { - cout << "usage: ceph-mds -i name [flags] [[--hot-standby][rank]]\n" + cout << "usage: ceph-mds -i <ID> [flags] [[--hot-standby][rank]]\n" << " -m monitorip:port\n" << " connect to monitor at given address\n" << " --debug_mds n\n" diff --git a/src/ceph_mgr.cc b/src/ceph_mgr.cc index c3fcc276c79..ae5feb3751a 100644 --- a/src/ceph_mgr.cc +++ b/src/ceph_mgr.cc @@ -24,6 +24,12 @@ #include "mgr/MgrStandby.h" +static void usage() +{ + cout << "usage: ceph-mgr -i <ID> [flags]\n" + << std::endl; + generic_server_usage(); +} /** * A short main() which just instantiates a MgrStandby and @@ -43,9 +49,7 @@ int main(int argc, const char **argv) // Handle --help if ((args.size() == 1 && (std::string(args[0]) == "--help" || std::string(args[0]) == "-h"))) { - MgrStandby mgr; - mgr.usage(); - return 0; + usage(); } global_init_daemonize(g_ceph_context); diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc index 6e8fd1d5749..a7be9694a92 100644 --- a/src/ceph_mon.cc +++ b/src/ceph_mon.cc @@ -158,25 +158,26 @@ int check_mon_data_empty() static void usage() { - cerr << "usage: ceph-mon -i monid [flags]" << std::endl; - cerr << " --debug_mon n\n"; - cerr << " debug monitor level (e.g. 10)\n"; - cerr << " --mkfs\n"; - cerr << " build fresh monitor fs\n"; - cerr << " --force-sync\n"; - cerr << " force a sync from another mon by wiping local data (BE CAREFUL)\n"; - cerr << " --yes-i-really-mean-it\n"; - cerr << " mandatory safeguard for --force-sync\n"; - cerr << " --compact\n"; - cerr << " compact the monitor store\n"; - cerr << " --osdmap <filename>\n"; - cerr << " only used when --mkfs is provided: load the osdmap from <filename>\n"; - cerr << " --inject-monmap <filename>\n"; - cerr << " write the <filename> monmap to the local monitor store and exit\n"; - cerr << " --extract-monmap <filename>\n"; - cerr << " extract the monmap from the local monitor store and exit\n"; - cerr << " --mon-data <directory>\n"; - cerr << " where the mon store and keyring are located\n"; + cout << "usage: ceph-mon -i <ID> [flags]\n" + << " --debug_mon n\n" + << " debug monitor level (e.g. 10)\n" + << " --mkfs\n" + << " build fresh monitor fs\n" + << " --force-sync\n" + << " force a sync from another mon by wiping local data (BE CAREFUL)\n" + << " --yes-i-really-mean-it\n" + << " mandatory safeguard for --force-sync\n" + << " --compact\n" + << " compact the monitor store\n" + << " --osdmap <filename>\n" + << " only used when --mkfs is provided: load the osdmap from <filename>\n" + << " --inject-monmap <filename>\n" + << " write the <filename> monmap to the local monitor store and exit\n" + << " --extract-monmap <filename>\n" + << " extract the monmap from the local monitor store and exit\n" + << " --mon-data <directory>\n" + << " where the mon store and keyring are located\n" + << std::endl; generic_server_usage(); } diff --git a/src/ceph_osd.cc b/src/ceph_osd.cc index 2ecce87308d..5135c81ed94 100644 --- a/src/ceph_osd.cc +++ b/src/ceph_osd.cc @@ -73,7 +73,7 @@ void handle_osd_signal(int signum) static void usage() { - cout << "usage: ceph-osd -i <osdid>\n" + cout << "usage: ceph-osd -i <ID> [flags]\n" << " --osd-data PATH data directory\n" << " --osd-journal PATH\n" << " journal file or block device\n" diff --git a/src/mgr/MgrStandby.h b/src/mgr/MgrStandby.h index b60d591018e..8698e92a7de 100644 --- a/src/mgr/MgrStandby.h +++ b/src/mgr/MgrStandby.h @@ -73,7 +73,6 @@ public: int init(); void shutdown(); - void usage() {} int main(vector<const char *> args); void handle_signal(int signum); void send_beacon(); |