From: Sage Weil Date: Mon, 20 Jan 2020 22:51:18 +0000 (-0600) Subject: mon/ConfigMonitor: transition old keys to have global/ prefix X-Git-Tag: v15.1.0~59^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4d30f8aeadf518d4006eeefd7edc133f02642f48;p=ceph.git mon/ConfigMonitor: transition old keys to have global/ prefix Convert keys that were missing the global prefix before to now have them. Signed-off-by: Sage Weil --- diff --git a/src/mon/ConfigMonitor.cc b/src/mon/ConfigMonitor.cc index ab67b3a90fbd..0af0acc2a19b 100644 --- a/src/mon/ConfigMonitor.cc +++ b/src/mon/ConfigMonitor.cc @@ -779,6 +779,13 @@ void ConfigMonitor::load_config() << dendl; pending_cleanup[key] = boost::none; } else { + if (section_name.empty()) { + // we prefer global/$option instead of just $option + derr << __func__ << " adding global/ prefix to key '" << key << "'" + << dendl; + pending_cleanup[key] = boost::none; + pending_cleanup["global/"s + key] = it->value(); + } Section *section = &config_map.global;; if (section_name.size()) { if (section_name.find('.') != std::string::npos) {