]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: add module_type to CephContext; use to initialize rotating keys
authorSage Weil <sage@newdream.net>
Mon, 6 Jun 2011 20:06:41 +0000 (13:06 -0700)
committerSage Weil <sage@newdream.net>
Mon, 6 Jun 2011 20:06:41 +0000 (13:06 -0700)
This fixes rotating keys.

Signed-off-by: Sage Weil <sage@newdream.net>
src/common/ceph_context.cc
src/common/ceph_context.h
src/common/common_init.cc
src/mon/MonClient.cc

index 711f6b643b0a972166bde7f7e1e9ded13f470091..fd104ffb33153dea69e5839c54c59a919837b9e6 100644 (file)
@@ -82,6 +82,7 @@ CephContext::
 CephContext()
   : _doss(new DoutStreambuf <char, std::basic_string<char>::traits_type>()),
     _dout(_doss),
+    module_type(0),
     _prof_logger_conf_obs(new ProfLoggerConfObs()),
     _service_thread(NULL)
 {
index ef16583e4eff9ed21da51afdfc5c709be0a49224..42048528aee82f3774ff6365908e036e4d3f2f97 100644 (file)
@@ -41,6 +41,8 @@ public:
   DoutStreambuf <char, std::basic_string<char>::traits_type> *_doss;
   std::ostream _dout;
 
+  unsigned module_type;
+
   /* Start the Ceph Context's service thread */
   void start_service_thread();
 
index a1124e8bdf9155111dd1c80e0692aacd744c0c75..c436f7cd8d0560cb4150eb9d88277f2be34df50c 100644 (file)
@@ -94,6 +94,8 @@ void common_init(std::vector < const char* >& args,
   CephContext *cct = common_preinit(iparams, code_env, flags);
   md_config_t *conf = cct->_conf;
 
+  cct->module_type = module_type;
+
   std::deque<std::string> parse_errors;
   int ret = conf->parse_config_files(iparams.get_conf_files(), &parse_errors);
   if (ret == -EDOM) {
index 60babf647d2444e815aba6114e58d8a664c891aa..2fc67c1c2719ab9288b50b05b2e8f968c26c2715 100644 (file)
@@ -330,7 +330,7 @@ int MonClient::init()
     derr << "MonClient::init(): Failed to create keyring" << dendl;
     return -EDOM;
   }
-  rotating_secrets = new RotatingKeyRing(CEPH_ENTITY_TYPE_OSD, keyring);
+  rotating_secrets = new RotatingKeyRing(cct->module_type, keyring);
 
   entity_name = g_conf.name;