]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: remove OSD-specific leveldb options 1952/head
authorJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 23 Jun 2014 21:41:35 +0000 (22:41 +0100)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 23 Jun 2014 21:41:35 +0000 (22:41 +0100)
OSDs will now rely on 'leveldb_*' config options.  We do keep however
leveldb's log enabled for OSDs by passing 'leveldb_log=""' as a default
argument to global_init() on ceph_osd.cc -- however, users will be able
to override this at their own discretion.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
PendingReleaseNotes
src/ceph_osd.cc
src/common/config_opts.h
src/os/FileStore.cc

index c81d428c4047bcbf38c646ba2fd4ceaa3c9090e3..5e3741f9b70a099a8bf810c215189a4a56f0c504 100644 (file)
@@ -2,13 +2,17 @@
 v0.82
 -----
 
-- mon-specific leveldb options have been removed.  From this point onward,
-  users should use 'leveldb_' generic options and add the options in the
-  appropriate sections of their configuration files.
-  The monitors will still maintain the following monitor-specific defaults:
+- mon-specific and osd-specific leveldb options have been removed.
+  From this point onward users should use 'leveldb_' generic options and add
+  the options in the appropriate sections of their configuration files.
+  Monitors will still maintain the following monitor-specific defaults:
 
     leveldb_write_buffer_size = 32*1024*1024  = 33554432  // 32MB
     leveldb_cache_size        = 512*1024*1204 = 536870912 // 512MB
     leveldb_block_size        = 64*1024       = 65536     // 64KB
     leveldb_compression       = false
     leveldb_log               = ""
+
+  OSDs will still maintain the following osd-specific defaults:
+
+    leveldb_log               = ""
index 029ef28c40565b09334d77c77b505e10b85b6dd0..24587add0e12696f39e9a3d3aec469d0787ed4e2 100644 (file)
@@ -72,7 +72,12 @@ int main(int argc, const char **argv)
   argv_to_vec(argc, argv, args);
   env_to_vec(args);
 
-  global_init(NULL, args, CEPH_ENTITY_TYPE_OSD, CODE_ENVIRONMENT_DAEMON, 0);
+  vector<const char*> def_args;
+  // We want to enable leveldb's log, while allowing users to override this
+  // option, therefore we will pass it as a default argument to global_init().
+  def_args.push_back("--leveldb-log=");
+
+  global_init(&def_args, args, CEPH_ENTITY_TYPE_OSD, CODE_ENVIRONMENT_DAEMON, 0);
   ceph_heap_profiler_init();
 
   // osd specific args
index b11884cd3aa3ab44d9114973f5fb0e03c54befbd..c33988287775727251e074ad5c99151539c4d9d5 100644 (file)
@@ -545,14 +545,6 @@ OPTION(osd_op_history_duration, OPT_U32, 600) // Oldest completed op to track
 OPTION(osd_target_transaction_size, OPT_INT, 30)     // to adjust various transactions that batch smaller items
 OPTION(osd_failsafe_full_ratio, OPT_FLOAT, .97) // what % full makes an OSD "full" (failsafe)
 OPTION(osd_failsafe_nearfull_ratio, OPT_FLOAT, .90) // what % full makes an OSD near full (failsafe)
-OPTION(osd_leveldb_write_buffer_size, OPT_U64, 0) // OSD's leveldb write buffer size
-OPTION(osd_leveldb_cache_size, OPT_U64, 0) // OSD's leveldb cache size
-OPTION(osd_leveldb_block_size, OPT_U64, 0) // OSD's leveldb block size
-OPTION(osd_leveldb_bloom_size, OPT_INT, 0) // OSD's leveldb bloom bits per entry
-OPTION(osd_leveldb_max_open_files, OPT_INT, 0) // OSD's leveldb max open files
-OPTION(osd_leveldb_compression, OPT_BOOL, true) // OSD's leveldb uses compression
-OPTION(osd_leveldb_paranoid, OPT_BOOL, false) // OSD's leveldb paranoid flag
-OPTION(osd_leveldb_log, OPT_STR, "")  // enable OSD leveldb log file
 
 // determines whether PGLog::check() compares written out log to stored log
 OPTION(osd_debug_pg_log_writeout, OPT_BOOL, false)
index 092ad22cd849da94edfc474480fd71859f1b579b..8840124bb015329e326c20a3142a19499d87e57b 100644 (file)
@@ -1352,22 +1352,6 @@ int FileStore::mount()
     LevelDBStore *omap_store = new LevelDBStore(g_ceph_context, omap_dir);
 
     omap_store->init();
-    if (g_conf->osd_leveldb_write_buffer_size)
-      omap_store->options.write_buffer_size = g_conf->osd_leveldb_write_buffer_size;
-    if (g_conf->osd_leveldb_cache_size)
-      omap_store->options.cache_size = g_conf->osd_leveldb_cache_size;
-    if (g_conf->osd_leveldb_block_size)
-      omap_store->options.block_size = g_conf->osd_leveldb_block_size;
-    if (g_conf->osd_leveldb_bloom_size)
-      omap_store->options.bloom_size = g_conf->osd_leveldb_bloom_size;
-    if (g_conf->osd_leveldb_compression)
-      omap_store->options.compression_enabled = g_conf->osd_leveldb_compression;
-    if (g_conf->osd_leveldb_paranoid)
-      omap_store->options.paranoid_checks = g_conf->osd_leveldb_paranoid;
-    if (g_conf->osd_leveldb_max_open_files)
-      omap_store->options.max_open_files = g_conf->osd_leveldb_max_open_files;
-    if (g_conf->osd_leveldb_log.length())
-      omap_store->options.log_file = g_conf->osd_leveldb_log;
 
     stringstream err;
     if (omap_store->create_and_open(err)) {