]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr: rename config_prefix -> mgr_store_prefix
authorSage Weil <sage@newdream.net>
Tue, 16 Feb 2021 23:27:08 +0000 (18:27 -0500)
committerSage Weil <sage@newdream.net>
Wed, 17 Feb 2021 17:27:58 +0000 (12:27 -0500)
The prefix for module kv store is "mgr/", but it is not *config* (which
lives under /config/mgr/...).  Rename the constant.

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

index 9e0fa60aca07c29f25957d7d125ef9a2ea6db1e9..02935c8b5f849f9f1c857a9b782b6442f2219a57 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "mgr/MgrContext.h"
 
-// For ::config_prefix
+// For ::mgr_store_prefix
 #include "PyModule.h"
 #include "PyModuleRegistry.h"
 #include "PyUtil.h"
@@ -593,7 +593,7 @@ bool ActivePyModules::get_store(const std::string &module_name,
   without_gil_t no_gil;
   std::lock_guard l(lock);
 
-  const std::string global_key = PyModule::config_prefix
+  const std::string global_key = PyModule::mgr_store_prefix
     + module_name + "/" + key;
 
   dout(4) << __func__ << " key: " << global_key << dendl;
@@ -685,7 +685,7 @@ PyObject *ActivePyModules::get_store_prefix(const std::string &module_name,
   std::lock_guard l(lock);
   std::lock_guard lock(module_config.lock);
 
-  const std::string base_prefix = PyModule::config_prefix
+  const std::string base_prefix = PyModule::mgr_store_prefix
                                     + module_name + "/";
   const std::string global_prefix = base_prefix + prefix;
   dout(4) << __func__ << " prefix: " << global_prefix << dendl;
@@ -703,7 +703,7 @@ PyObject *ActivePyModules::get_store_prefix(const std::string &module_name,
 void ActivePyModules::set_store(const std::string &module_name,
     const std::string &key, const boost::optional<std::string>& val)
 {
-  const std::string global_key = PyModule::config_prefix
+  const std::string global_key = PyModule::mgr_store_prefix
                                    + module_name + "/" + key;
 
   Command set_cmd;
index 26422e150e7979b54b2baf4d9bf1e067ef6fcda6..91e5ed482698d8a9bf56df4105b94c069e7b016c 100644 (file)
@@ -179,7 +179,7 @@ std::map<std::string, std::string> Mgr::load_store()
     
     dout(20) << "saw key '" << key << "'" << dendl;
 
-    const std::string store_prefix = PyModule::config_prefix;
+    const std::string store_prefix = PyModule::mgr_store_prefix;
     const std::string device_prefix = "device/";
 
     if (key.substr(0, device_prefix.size()) == device_prefix ||
index 6595f4426c2572f1b4588a3920e85ebf611123ce..60c18eb3773a12950b148acb31c7b2802266f6d0 100644 (file)
@@ -28,7 +28,7 @@
 #define dout_prefix *_dout << "mgr[py] "
 
 // definition for non-const static member
-std::string PyModule::config_prefix = "mgr/";
+std::string PyModule::mgr_store_prefix = "mgr/";
 
 // Courtesy of http://stackoverflow.com/questions/1418015/how-to-get-python-exception-text
 #define BOOST_BIND_GLOBAL_PLACEHOLDERS
index 72a3ef491fa27666b737dfdfff67a5e8fd61bb30..6df3ee5860f4c380abb5f8dddc07735bcf3bd5cf 100644 (file)
@@ -86,7 +86,7 @@ private:
   std::map<std::string, MgrMap::ModuleOption> options;
 
 public:
-  static std::string config_prefix;
+  static std::string mgr_store_prefix;
 
   SafeThreadState pMyThreadState;
   PyObject *pClass = nullptr;
index 3579ae68acee63f09740e8929b7044b1522d7c84..86ee8550cadd5bb218654dfb32840e91a5083e5d 100644 (file)
@@ -20,7 +20,7 @@
 #include "mgr/MgrContext.h"
 #include "mgr/Gil.h"
 
-// For ::config_prefix
+// For ::mgr_store_prefix
 #include "PyModuleRegistry.h"
 
 #define dout_context g_ceph_context
@@ -143,7 +143,7 @@ bool StandbyPyModule::get_store(const std::string &key,
                                 std::string *value) const
 {
 
-  const std::string global_key = PyModule::config_prefix
+  const std::string global_key = PyModule::mgr_store_prefix
     + get_name() + "/" + key;
 
   dout(4) << __func__ << " key: " << global_key << dendl;