From: Kefu Chai Date: Sun, 16 May 2021 03:17:37 +0000 (+0800) Subject: common/options: extract mgr and mon options out X-Git-Tag: v17.1.0~1905^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9b5e54d996a771f63b97620d4640c08f6406d843;p=ceph.git common/options: extract mgr and mon options out the purposes of this change are: * faster compilation, so the cmake generator can process .yaml.in files in parallel. * allow daemons to include a subset of options which it is interested in. * better maintainability. by grouping options in different .yaml.in files, developers understand who are the consumers of an option. in this change, options only read by mgr are extracted into mgr.yaml.in, and options only read by mon are extracted into mon.yaml.in. so all options in mgr.yaml.in should have "services: mgr" in their definition by default. the ones in mon.yaml.in have "services: mon". in the case where options are consumed by multiple services or tools, the option should add "common" to its "services" if it is supposed to be consumed by a tool, or "mon" if it is read by monitor as well. in future, when preprocessing the .yaml.in, we have to look up in other .yaml files for options whose services includes "mon", when compiling ceph-mon executable in addition to collecting the options in mon.yaml.in. but it takes time to audit all the options, so only part of them are processed. Signed-off-by: Kefu Chai --- diff --git a/src/common/options/CMakeLists.txt b/src/common/options/CMakeLists.txt index 8705c31fdc83..86de2e7972c8 100644 --- a/src/common/options/CMakeLists.txt +++ b/src/common/options/CMakeLists.txt @@ -85,6 +85,7 @@ add_options(crimson) add_options(mgr) add_options(mds) add_options(mds-client) +add_options(mon) add_options(osd) add_options(rbd) add_options(rbd-mirror) diff --git a/src/common/options/build_options.cc b/src/common/options/build_options.cc index 323548d16fab..001fac90287c 100644 --- a/src/common/options/build_options.cc +++ b/src/common/options/build_options.cc @@ -8,6 +8,7 @@ std::vector