From: Sage Weil Date: Tue, 16 Feb 2021 23:26:01 +0000 (-0500) Subject: mgr: fix config option prefix X-Git-Tag: v16.2.0~168^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cf577b4353e8ee460a51e883d4bc07198a6146c5;p=ceph.git mgr: fix config option prefix This code is working with config option names, not config-key keys. Signed-off-by: Sage Weil (cherry picked from commit b0a4bff845bec0f9bdd07db1acbc78c59f2efca4) --- diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc index 19fcd433db39..57c0e45de8dc 100644 --- a/src/mgr/ActivePyModules.cc +++ b/src/mgr/ActivePyModules.cc @@ -586,8 +586,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; diff --git a/src/mgr/PyModule.cc b/src/mgr/PyModule.cc index 48295a7a5bc6..6595f4426c25 100644 --- a/src/mgr/PyModule.cc +++ b/src/mgr/PyModule.cc @@ -150,8 +150,7 @@ void PyModuleConfig::set_config( const std::string &module_name, const std::string &key, const boost::optional& 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; diff --git a/src/mgr/StandbyPyModules.cc b/src/mgr/StandbyPyModules.cc index b1344d0adb58..3579ae68acee 100644 --- a/src/mgr/StandbyPyModules.cc +++ b/src/mgr/StandbyPyModules.cc @@ -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;