Skip to content

Commit

Permalink
ceph-mds: obsolete hot-standby option
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Donnelly <[email protected]>
  • Loading branch information
batrick committed Feb 28, 2019
1 parent d463883 commit 80eece8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.
11 changes: 1 addition & 10 deletions doc/man/8/ceph-mds.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Synopsis
========

| **ceph-mds** -i <*ID*> [flags] [ --hot-standby <*rank*> ]
| **ceph-mds** -i <*ID*> [flags]

Description
Expand All @@ -27,11 +27,6 @@ it a logical rank, or put it in a standby pool to take over for
another daemon that crashes. Some of the specified options can cause
other behaviors.

If you specify --hot-standby, you must specify the rank on the command
line. Alternatively, you can specify one of the mds_standby_for_[rank|name]
parameters in the config. The command line specification overrides the config,
and specifying the rank overrides specifying the name.


Options
=======
Expand Down Expand Up @@ -68,10 +63,6 @@ Options
Connect to specified monitor (instead of looking through
``ceph.conf``).

.. option:: --hot-standby <rank>

Start as a hot standby for MDS <rank>.

.. option:: --id/-i ID

Set ID portion of the MDS name.
Expand Down
26 changes: 2 additions & 24 deletions src/ceph_mds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,32 +54,16 @@

static void usage()
{
cout << "usage: ceph-mds -i <ID> [flags] [--hot-standby <rank>]\n"
cout << "usage: ceph-mds -i <ID> [flags]\n"
<< " -m monitorip:port\n"
<< " connect to monitor at given address\n"
<< " --debug_mds n\n"
<< " debug MDS level (e.g. 10)\n"
<< " --hot-standby rank\n"
<< " start up as a hot standby for rank\n"
<< std::endl;
generic_server_usage();
}


static int parse_rank(const char *opt_name, const std::string &val)
{
std::string err;
int ret = strict_strtol(val.c_str(), 10, &err);
if (!err.empty()) {
derr << "error parsing " << opt_name << ": failed to parse rank. "
<< "It must be an int." << "\n" << dendl;
exit(1);
}
return ret;
}



MDSDaemon *mds = NULL;


Expand Down Expand Up @@ -115,13 +99,7 @@ int main(int argc, const char **argv)
break;
}
else if (ceph_argparse_witharg(args, i, &val, "--hot-standby", (char*)NULL)) {
int r = parse_rank("hot-standby", val);
dout(0) << "requesting standby_replay for mds." << r << dendl;
char rb[32];
snprintf(rb, sizeof(rb), "%d", r);
g_conf().set_val("mds_standby_for_rank", rb);
g_conf().set_val("mds_standby_replay", "true");
g_conf().apply_changes(nullptr);
dout(0) << "--hot-standby is obsolete and has no effect" << dendl;
}
else {
derr << "Error: can't understand argument: " << *i << "\n" << dendl;
Expand Down

0 comments on commit 80eece8

Please sign in to comment.