]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common/config: record is_daemon
authorSage Weil <sage@redhat.com>
Mon, 13 Nov 2017 15:24:03 +0000 (09:24 -0600)
committerSage Weil <sage@redhat.com>
Tue, 6 Mar 2018 20:44:09 +0000 (14:44 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config.cc
src/common/config.h

index d903ca4e13d8b5ef573aae961c71aef1cf012a67..cbba1c80b7b0067c86e1727ec394617d952ae2b6 100644 (file)
@@ -75,8 +75,9 @@ int ceph_resolve_file_search(const std::string& filename_list,
 
 
 md_config_t::md_config_t(bool is_daemon)
-  : cluster(""),
-  lock("md_config_t", true, false)
+  : is_daemon(is_daemon),
+    cluster(""),
+    lock("md_config_t", true, false)
 {
   // Load the compile-time list of Option into
   // a map so that we can resolve keys quickly.
index 112e328963f7a420fb85d5d4e2461ecddd23b406..e92813ab92c7d7e2f03565f6d42d4cbad229f7f5 100644 (file)
@@ -65,6 +65,8 @@ public:
                          bool md_config_t::*,
                          entity_addr_t md_config_t::*,
                          uuid_d md_config_t::*> member_ptr_t;
+  /// true if we are a daemon (as per CephContext::code_env)
+  const bool is_daemon;
 
   /* Maps configuration options to the observer listening for them. */
   typedef std::multimap <std::string, md_config_obs_t*> obs_map_t;