From b0a4bff845bec0f9bdd07db1acbc78c59f2efca4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 16 Feb 2021 18:26:01 -0500 Subject: [PATCH] mgr: fix config option prefix This code is working with config option names, not config-key keys. Signed-off-by: Sage Weil --- src/mgr/ActivePyModules.cc | 3 +-- src/mgr/PyModule.cc | 3 +-- src/mgr/StandbyPyModules.cc | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) 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; -- 2.39.5