]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
options: add bounds and description to osd heartbeat interval 21373/head
authorPiotr Dałek <piotr.dalek@corp.ovh.com>
Thu, 12 Apr 2018 11:09:42 +0000 (13:09 +0200)
committerPiotr Dałek <piotr.dalek@corp.ovh.com>
Thu, 12 Apr 2018 11:09:42 +0000 (13:09 +0200)
Previously this var was unbounded, meaning that rogue injectargs
could kill the cluster. Also, add a description to it and to
osd_heartbeat_min_size.

Signed-off-by: Piotr Dałek <piotr.dalek@corp.ovh.com>
src/common/options.cc

index fb6914d0dda679f3ede491af561ccdb15c1d0ac4..06100b589ce582dd74d8b0e3c6116d2a5e6d4260 100644 (file)
@@ -2862,7 +2862,8 @@ std::vector<Option> get_global_options() {
 
     Option("osd_heartbeat_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
     .set_default(6)
-    .set_description(""),
+    .set_min_max(1, 86400)
+    .set_description("Interval (in seconds) between peer pings"),
 
     Option("osd_heartbeat_grace", Option::TYPE_INT, Option::LEVEL_ADVANCED)
     .set_default(20)
@@ -2878,7 +2879,7 @@ std::vector<Option> get_global_options() {
 
     Option("osd_heartbeat_min_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
     .set_default(2000)
-    .set_description(""),
+    .set_description("Minimum heartbeat packet size in bytes. Will add dummy payload if heartbeat packet is smaller than this."),
 
     Option("osd_pg_max_concurrent_snap_trims", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
     .set_default(2)