]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/config: update values when they are removed via mon 33327/head
authorSage Weil <sage@redhat.com>
Fri, 6 Dec 2019 17:10:22 +0000 (11:10 -0600)
committerNathan Cutler <ncutler@suse.com>
Fri, 14 Feb 2020 14:56:44 +0000 (15:56 +0100)
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 <sage@redhat.com>
(cherry picked from commit 56be2e4a373dcf794756eaf05958dd6f44a4ca9e)

Conflicts:
src/common/config.cc
- _refresh does not take values argument in mimic

src/common/config.cc

index 748e7d29bacc0ce4b87853f6fa3c8d09bf65a917..581f0e5ee2aac52d3891f267e1d8503a65625f7f 100644 (file)
@@ -311,6 +311,11 @@ int md_config_t::set_mon_vals(CephContext *cct,
                      << " cleared (was " << Option::to_str(j->second) << ")"
                      << dendl;
        _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(*o);
       }
     }
   }