From b0b5d9119b160eca1bf3690e0386f235d31aea15 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 6 Dec 2019 11:10:22 -0600 Subject: [PATCH] common/config: update values when they are removed via mon If a value is set via the mon (ceph config set ...), and then later removed, the removal doesn't propagate to the legacy values (or debug options) because update_legacy_values() only iterates over legacy value and not debug options. Similarly, we want to trigger a config notification to any observers, so we need to add the option to values.changed. Fixes: https://tracker.ceph.com/issues/42964 Signed-off-by: Sage Weil (cherry picked from commit 56be2e4a373dcf794756eaf05958dd6f44a4ca9e) --- src/common/config.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/config.cc b/src/common/config.cc index 4154ac66194f9..8024d433bf6a6 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -320,6 +320,11 @@ int md_config_t::set_mon_vals(CephContext *cct, << " cleared (was " << Option::to_str(config->second) << ")" << dendl; values.rm_val(name, CONF_MON); + // if this is a debug option, it needs to propagate to teh subsys; + // this isn't covered by update_legacy_vals() below. similarly, + // we want to trigger a config notification for these items. + const Option *o = find_option(name); + _refresh(values, *o); }); values_bl.clear(); update_legacy_vals(values); -- 2.39.5