From 481bb2ce1b4209297c6f4fb8985a66493fec4f38 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Sat, 14 Nov 2015 21:56:15 +0100 Subject: [PATCH] rbd: accept --user, refuse -i --user is the equivalent of --id (mentioned in docs and ceph -h) and used by at least a couple of qa scripts and teuthology. Add it to the list of valid rbd options - it's handled inside global_init() before Shell:execute() is called. OTOH allowing -i is bogus - global_init() wouldn't process it for clients (CEPH_ENTITY_TYPE_CLIENT), which rbd tool is one of. Drop it. Signed-off-by: Ilya Dryomov --- src/test/cli/rbd/help.t | 3 ++- src/tools/rbd/Shell.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/cli/rbd/help.t b/src/test/cli/rbd/help.t index 6457bded6c4a..502a6722bdce 100644 --- a/src/test/cli/rbd/help.t +++ b/src/test/cli/rbd/help.t @@ -51,7 +51,8 @@ Optional arguments: -c [ --conf ] arg path to cluster configuration --cluster arg cluster name - -i [ --id ] arg client id (without 'client.' prefix) + --id arg client id (without 'client.' prefix) + --user arg client id (without 'client.' prefix) -n [ --name ] arg client name -m [ --mon_host ] arg monitor host --secret arg path to secret key (deprecated) diff --git a/src/tools/rbd/Shell.cc b/src/tools/rbd/Shell.cc index f7dfeeb5efec..c71f8ffbb0cf 100644 --- a/src/tools/rbd/Shell.cc +++ b/src/tools/rbd/Shell.cc @@ -233,7 +233,8 @@ void Shell::get_global_options(po::options_description *opts) { opts->add_options() ("conf,c", po::value(), "path to cluster configuration") ("cluster", po::value(), "cluster name") - ("id,i", po::value(), "client id (without 'client.' prefix)") + ("id", po::value(), "client id (without 'client.' prefix)") + ("user", po::value(), "client id (without 'client.' prefix)") ("name,n", po::value(), "client name") ("mon_host,m", po::value(), "monitor host") ("secret", po::value(), "path to secret key (deprecated)") -- 2.47.3