]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson, common: validate the BlueStore's config for AlienStore.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 22 Jun 2020 15:37:53 +0000 (17:37 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 23 Jun 2020 12:51:09 +0000 (14:51 +0200)
This commit bases on the idea from Kefu Chai. Thanks!

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/common/options.cc

index 660c2688e73a1ac66b8b0df4f153038f51a39bd1..8414d1708b2766dcc18371ef263925e50bbe0c5a 100644 (file)
@@ -4430,6 +4430,20 @@ std::vector<Option> get_global_options() {
 
     Option("bluestore_rocksdb_cf", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
     .set_default(true)
+#ifdef WITH_SEASTAR
+    // This is necessary as the Seastar's allocator imposes restrictions
+    // on the number of threads that entered malloc/free/*. Unfortunately,
+    // RocksDB sharding in BlueStore dramatically lifted the number of
+    // threads spawn during RocksDB's init.
+    .set_validator([](std::string *value, std::string *error_message){
+      if (*value != "false") {
+        *error_message = "invalid BlueStore sharding configuration."
+                         " Be aware any change takes effect only on mkfs!";
+        return -EINVAL;
+      }
+      return 0;
+    })
+#endif
     .set_description("Enable use of rocksdb column families for bluestore metadata"),
 
     Option("bluestore_rocksdb_cfs", Option::TYPE_STR, Option::LEVEL_DEV)