From: Sage Weil Date: Mon, 18 Jun 2018 12:01:24 +0000 (-0500) Subject: common/options: dump flags X-Git-Tag: v14.0.1~1084^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c4d76ca0c595af0eb01ffaa9db0a17c49b25f7d;p=ceph.git common/options: dump flags Also document. Signed-off-by: Sage Weil --- diff --git a/doc/dev/config.rst b/doc/dev/config.rst index fbc4a5d5660f..40d2d6f7a081 100644 --- a/doc/dev/config.rst +++ b/doc/dev/config.rst @@ -155,3 +155,12 @@ Enums For options with a defined set of allowed values:: .set_enum_allowed({"none", "crc32c", "crc32c_16", "crc32c_8", "xxhash32", "xxhash64"}) + +Flags +----- + +* **RUNTIME**: the value can be updated at runtime +* **NO_MON_UPDATE**: Daemons/clients do not pull this value from the monitor config database. We disallow setting this option via 'ceph config set ...'. This option should be configured via ceph.conf or via the command line. +* **STARTUP**: option takes effect only during daemon startup +* **CLUSTER_CREATE**: option only affects cluster creation +* **CREATE**: option only affects daemon creation diff --git a/src/common/options.cc b/src/common/options.cc index fc7df3b4df89..73eac3e27fb4 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -319,6 +319,24 @@ void Option::dump(Formatter *f) const dump_value("max", max, f); f->dump_bool("can_update_at_runtime", can_update_at_runtime()); + + f->open_array_section("flags"); + if (has_flag(FLAG_RUNTIME)) { + f->dump_string("option", "runtime"); + } + if (has_flag(FLAG_NO_MON_UPDATE)) { + f->dump_string("option", "no_mon_update"); + } + if (has_flag(FLAG_STARTUP)) { + f->dump_string("option", "startup"); + } + if (has_flag(FLAG_CLUSTER_CREATE)) { + f->dump_string("option", "cluster_create"); + } + if (has_flag(FLAG_CREATE)) { + f->dump_string("option", "create"); + } + f->close_section(); } std::string Option::to_str(const Option::value_t& v)