]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: make config changes actually apply 6520/head
authorMykola Golub <mgolub@mirantis.com>
Tue, 10 Nov 2015 09:27:05 +0000 (11:27 +0200)
committerMykola Golub <mgolub@mirantis.com>
Wed, 11 Nov 2015 07:38:49 +0000 (09:38 +0200)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/tools/rbd/Shell.cc
src/tools/rbd/Utils.cc

index ec2e8d25ad61f4984962708d80bbb437da19cb76..f595faea231967203e614cc1db02fd92f3bd10cf 100644 (file)
@@ -27,8 +27,7 @@ void validate(boost::any& v, const std::vector<std::string>& values,
 
   po::validators::check_first_occurrence(v);
   const std::string &s = po::validators::get_single_string(values);
-  int r = g_conf->set_val("keyfile", s.c_str());
-  assert(r == 0);
+  g_conf->set_val_or_die("keyfile", s.c_str());
   v = boost::any(s);
 }
 
index 0b811ff2e1b622f7b761bfce6d5fb66f1db2c582..5d6e322813b25fe9ef0dfa64d8953ca5b2d84075 100644 (file)
@@ -337,6 +337,7 @@ int get_formatter(const po::variables_map &vm,
 
 void init_context() {
   g_conf->set_val_or_die("rbd_cache_writethrough_until_flush", "false");
+  g_conf->apply_changes(NULL);
   common_init_finish(g_ceph_context);
 }