]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common/config: rewrite (╯°□°)╯︵ ┻━┻
authorSage Weil <sage@redhat.com>
Fri, 1 Dec 2017 21:50:59 +0000 (15:50 -0600)
committerSage Weil <sage@redhat.com>
Tue, 6 Mar 2018 20:44:47 +0000 (14:44 -0600)
commitf8d4e5b5e9e540b16a0ed1e5617986046a7b2d25
tree90737b51ac7a7cb0e66f7365e07db0b35eb9a270
parent55f902f2677a0d033d9c0f2d765fe8202739bc11
common/config: rewrite (╯°□°)╯︵ ┻━┻

This is too complete a rewrite to reasonably break down into small steps,
and even if I could, it would be harder to review that way than to simply
review the new implementation.  The semantics of the old one were so weird
that it's harder to reason about the change in behavior than to simply
review the new behavior.

That's my story, at least, and I'm sticking to it!

So, here are the highlights:

 - $foo meta expansions are evaluated at get_val() time.  This means the
weird bool arguments to set_val specifying whether things were expanded
are removed (they didn't make any sense unless you were thinking about the
old implementation).
 - for every option, we track values from any inputs (config, mon,
   override).  At get_val() time, we pick the highest priority one.
 - diff() is rewritten to be simple and to show you all of the above.
 - internal interfaces are simplified, and in terms of Option::value_t
   whenever possible.
 - unit tests simplified somewhat based on the above.

Known issues:

 - legacy values get pushed out in select cases.  Notably if foo=$bar
   and bar is updated, we do not update $foo (there is no dependency
   tracking to do this efficiently).

Signed-off-by: Sage Weil <sage@redhat.com>
20 files changed:
PendingReleaseNotes
src/common/ceph_context.cc
src/common/config.cc
src/common/config.h
src/mds/MDSDaemon.cc
src/mgr/DaemonServer.cc
src/mon/Monitor.cc
src/osd/OSD.cc
src/test/common/test_config.cc
src/test/common/test_context.cc
src/test/daemon_config.cc
src/test/erasure-code/TestErasureCodeShec_all.cc
src/test/erasure-code/TestErasureCodeShec_arguments.cc
src/test/erasure-code/ceph_erasure_code.cc
src/test/erasure-code/ceph_erasure_code_non_regression.cc
src/test/mon/MonMap.cc
src/test/msgr/test_async_networkstack.cc
src/test/msgr/test_msgr.cc
src/test/osd/TestOSDMap.cc
src/test/unit.cc