From: Ilya Dryomov Date: Sat, 14 Nov 2015 20:56:15 +0000 (+0100) Subject: rbd: accept --user, refuse -i X-Git-Tag: v10.0.1~56^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6590%2Fhead;p=ceph.git 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 --- diff --git a/src/test/cli/rbd/help.t b/src/test/cli/rbd/help.t index 6457bded6c4..502a6722bdc 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 f7dfeeb5efe..c71f8ffbb0c 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)")