]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/ConfigMonitor: refresh mon configs too
authorSage Weil <sage@redhat.com>
Mon, 4 Dec 2017 22:53:54 +0000 (16:53 -0600)
committerSage Weil <sage@redhat.com>
Tue, 6 Mar 2018 20:44:48 +0000 (14:44 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/ConfigMonitor.cc

index 3c93473fb499f22360797bf26d4e5b2c9d66f5bd..fc88ae523dc2f9ec1f559172c44a622906bdd012 100644 (file)
@@ -170,6 +170,21 @@ void ConfigMonitor::load_config()
   jf.close_section();
   jf.flush(*_dout);
   *_dout << dendl;
+
+  // refresh our own config
+  {
+    const OSDMap& osdmap = mon->osdmon()->osdmap;
+    map<string,string> crush_location;
+    osdmap.crush->get_full_location(g_conf->host, &crush_location);
+    map<string,string> out;
+    config_map.generate_entity_map(
+      g_conf->name,
+      crush_location,
+      osdmap.crush.get(),
+      string(), // no device class
+      &out);
+    g_conf->set_mon_vals(g_ceph_context, out);
+  }
 }
 
 bool ConfigMonitor::refresh_config(MonSession *s)