Skip to content

Commit

Permalink
osd/mon/mds: unify usage text, always use stdout
Browse files Browse the repository at this point in the history
This unifies the first line of usage text: angle brackets
to indicate a mandatory option, and uppercase ID to match
the output from generic_server_usage().  It also ensures
ceph-mon prints all of its usage information to stdout,
same as the other daemons.

Signed-off-by: Tim Serong <[email protected]>
  • Loading branch information
tserong committed May 19, 2017
1 parent 6135c97 commit 4da9b48
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/ceph_mds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
39 changes: 20 additions & 19 deletions src/ceph_mon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion src/ceph_osd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,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"
Expand Down

0 comments on commit 4da9b48

Please sign in to comment.