From: Sage Weil Date: Tue, 16 Feb 2021 23:26:01 +0000 (-0500) Subject: mgr: fix config option prefix X-Git-Tag: v17.1.0~2900^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0a4bff845bec0f9bdd07db1acbc78c59f2efca4;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 --- diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc index 36d3718b24e..9e0fa60aca0 100644 --- a/src/mgr/ActivePyModules.cc +++ b/src/mgr/ActivePyModules.cc @@ -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; diff --git a/src/mgr/PyModule.cc b/src/mgr/PyModule.cc index 48295a7a5bc..6595f4426c2 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 b1344d0adb5..3579ae68ace 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;