From 80eece89a43d763ec10f85fc2c330c2f9fede454 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 22 Feb 2019 12:00:18 -0800 Subject: [PATCH] ceph-mds: obsolete hot-standby option Signed-off-by: Patrick Donnelly --- doc/man/8/ceph-mds.rst | 11 +---------- src/ceph_mds.cc | 26 ++------------------------ 2 files changed, 3 insertions(+), 34 deletions(-) diff --git a/doc/man/8/ceph-mds.rst b/doc/man/8/ceph-mds.rst index bab5e629fb2..a07b9105f7e 100644 --- a/doc/man/8/ceph-mds.rst +++ b/doc/man/8/ceph-mds.rst @@ -9,7 +9,7 @@ Synopsis ======== -| **ceph-mds** -i <*ID*> [flags] [ --hot-standby <*rank*> ] +| **ceph-mds** -i <*ID*> [flags] Description @@ -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 ======= @@ -68,10 +63,6 @@ Options Connect to specified monitor (instead of looking through ``ceph.conf``). -.. option:: --hot-standby - - Start as a hot standby for MDS . - .. option:: --id/-i ID Set ID portion of the MDS name. diff --git a/src/ceph_mds.cc b/src/ceph_mds.cc index 010a441d7d5..473d2de7eb5 100644 --- a/src/ceph_mds.cc +++ b/src/ceph_mds.cc @@ -54,32 +54,16 @@ static void usage() { - cout << "usage: ceph-mds -i [flags] [--hot-standby ]\n" + cout << "usage: ceph-mds -i [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; @@ -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; -- 2.39.5