From 2f9617d801d1223bc7b100e4723063ca27c31912 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 4 Dec 2017 16:53:54 -0600 Subject: [PATCH] mon/ConfigMonitor: refresh mon configs too Signed-off-by: Sage Weil --- src/mon/ConfigMonitor.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/mon/ConfigMonitor.cc b/src/mon/ConfigMonitor.cc index 3c93473fb49..fc88ae523dc 100644 --- a/src/mon/ConfigMonitor.cc +++ b/src/mon/ConfigMonitor.cc @@ -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 crush_location; + osdmap.crush->get_full_location(g_conf->host, &crush_location); + map 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) -- 2.39.5