]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/options: dump flags 22595/head
authorSage Weil <sage@redhat.com>
Mon, 18 Jun 2018 12:01:24 +0000 (07:01 -0500)
committerSage Weil <sage@redhat.com>
Mon, 18 Jun 2018 12:01:24 +0000 (07:01 -0500)
Also document.

Signed-off-by: Sage Weil <sage@redhat.com>
doc/dev/config.rst
src/common/options.cc

index fbc4a5d5660fdc93e1dfb95a068b3f29647cc1d4..40d2d6f7a081df4c603dcd435a306bc13b89258c 100644 (file)
@@ -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
index fc7df3b4df8977b97423bd8f18bac589a5cb7e70..73eac3e27fb48ce800f1f13b6697e2886081ee75 100644 (file)
@@ -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)