]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: fix config option prefix
authorSage Weil <sage@newdream.net>
Tue, 16 Feb 2021 23:26:01 +0000 (18:26 -0500)
committerSage Weil <sage@newdream.net>
Wed, 17 Feb 2021 17:27:58 +0000 (12:27 -0500)
This code is working with config option names, not config-key keys.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mgr/ActivePyModules.cc
src/mgr/PyModule.cc
src/mgr/StandbyPyModules.cc

index 36d3718b24efbeeeaa09e2fb6022b59af68f8d20..9e0fa60aca07c29f25957d7d125ef9a2ea6db1e9 100644 (file)
@@ -623,8 +623,7 @@ PyObject *ActivePyModules::dispatch_remote(
 bool ActivePyModules::get_config(const std::string &module_name,
     const std::string &key, std::string *val) const
 {
-  const std::string global_key = PyModule::config_prefix
-    + module_name + "/" + key;
+  const std::string global_key = "mgr/" + module_name + "/" + key;
 
   dout(20) << " key: " << global_key << dendl;
 
index 48295a7a5bc6d2d0cca63ac1d0b08c4ffa029a36..6595f4426c2572f1b4588a3920e85ebf611123ce 100644 (file)
@@ -150,8 +150,7 @@ void PyModuleConfig::set_config(
     const std::string &module_name,
     const std::string &key, const boost::optional<std::string>& val)
 {
-  const std::string global_key = PyModule::config_prefix
-                                   + module_name + "/" + key;
+  const std::string global_key = "mgr/" + module_name + "/" + key;
   Command set_cmd;
   {
     std::ostringstream cmd_json;
index b1344d0adb5882f1e1aa2d36fa2bea4127330a40..3579ae68acee63f09740e8929b7044b1522d7c84 100644 (file)
@@ -125,8 +125,7 @@ int StandbyPyModule::load()
 bool StandbyPyModule::get_config(const std::string &key,
                                  std::string *value) const
 {
-  const std::string global_key = PyModule::config_prefix
-    + get_name() + "/" + key;
+  const std::string global_key = "mgr/" + get_name() + "/" + key;
 
   dout(4) << __func__ << " key: " << global_key << dendl;