]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #17557 from theanalyst/wip-21269-luminous
authorAbhishek L <abhishek.lekshmanan@gmail.com>
Mon, 11 Sep 2017 20:23:50 +0000 (22:23 +0200)
committerGitHub <noreply@github.com>
Mon, 11 Sep 2017 20:23:50 +0000 (22:23 +0200)
luminous: some generic options can not be passed by rbd-nbd

Reviewed-By: Jason Dillaman <jdillaman@redhat.com>
1  2 
src/tools/rbd_nbd/rbd-nbd.cc

index 52b16230f1a30d026b54ec65a5d8d561893e6305,b566489071c95c35ce398b4e1e176a16e3d12e5b..bf7477f4d394fd225e3e732714ad251ae3041926
@@@ -924,15 -924,27 +924,27 @@@ static int do_list_mapped_devices(
  
  static int parse_args(vector<const char*>& args, std::ostream *err_msg, Config *cfg)
  {
-   std::vector<const char*>::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<std::string>("rbd_default_pool");
  
+   std::vector<const char*>::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;