From: Abhishek L Date: Mon, 11 Sep 2017 20:23:50 +0000 (+0200) Subject: Merge pull request #17557 from theanalyst/wip-21269-luminous X-Git-Tag: v12.2.1~58 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be9331252ae966a9d7ec1e5ce9321d8806061d6a;p=ceph.git Merge pull request #17557 from theanalyst/wip-21269-luminous luminous: some generic options can not be passed by rbd-nbd Reviewed-By: Jason Dillaman --- be9331252ae966a9d7ec1e5ce9321d8806061d6a diff --cc src/tools/rbd_nbd/rbd-nbd.cc index 52b16230f1a3,b566489071c9..bf7477f4d394 --- a/src/tools/rbd_nbd/rbd-nbd.cc +++ b/src/tools/rbd_nbd/rbd-nbd.cc @@@ -924,15 -924,27 +924,27 @@@ static int do_list_mapped_devices( static int parse_args(vector& args, std::ostream *err_msg, Config *cfg) { - std::vector::iterator i; - std::ostringstream err; + std::string conf_file_list; + std::string cluster; + CephInitParameters iparams = ceph_argparse_early_args( + args, CEPH_ENTITY_TYPE_CLIENT, &cluster, &conf_file_list); md_config_t config; - config.parse_config_files(nullptr, nullptr, 0); + config.name = iparams.name; + config.cluster = cluster; + + if (!conf_file_list.empty()) { + config.parse_config_files(conf_file_list.c_str(), nullptr, 0); + } else { + config.parse_config_files(nullptr, nullptr, 0); + } config.parse_env(); config.parse_argv(args); - cfg->poolname = config.rbd_default_pool; + cfg->poolname = config.get_val("rbd_default_pool"); + std::vector::iterator i; + std::ostringstream err; + for (i = args.begin(); i != args.end(); ) { if (ceph_argparse_flag(args, i, "-h", "--help", (char*)NULL)) { return HELP_INFO;