]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: DataHealthService: s/mon_leveldb_size_warn/mon_data_size_warn/
authorJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 23 Jun 2014 18:24:55 +0000 (19:24 +0100)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 23 Jun 2014 18:24:55 +0000 (19:24 +0100)
Make the option name independent from the store mechanism used underneath.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/common/config_opts.h
src/mon/DataHealthService.cc

index d003c4b948d296521d0c9dc1a70c8268789f667b..4323a7b104ff14f1f3c2902335c13fb7368610d4 100644 (file)
@@ -191,6 +191,7 @@ OPTION(mon_max_log_entries_per_event, OPT_INT, 4096)
 OPTION(mon_health_data_update_interval, OPT_FLOAT, 60.0)
 OPTION(mon_data_avail_crit, OPT_INT, 5)
 OPTION(mon_data_avail_warn, OPT_INT, 30)
+OPTION(mon_data_size_warn, OPT_U64, 15*1024*1024*1024) // issue a warning when the monitor's data store goes over 15GB (in bytes)
 OPTION(mon_config_key_max_entry_size, OPT_INT, 4096) // max num bytes per config-key entry
 OPTION(mon_sync_timeout, OPT_DOUBLE, 60.0)
 OPTION(mon_sync_max_payload_size, OPT_U32, 1048576) // max size for a sync chunk payload (say, 1MB)
@@ -219,7 +220,6 @@ OPTION(mon_leveldb_max_open_files, OPT_INT, 0) // monitor's leveldb max open fil
 OPTION(mon_leveldb_compression, OPT_BOOL, false) // monitor's leveldb uses compression
 OPTION(mon_leveldb_paranoid, OPT_BOOL, false)   // monitor's leveldb paranoid flag
 OPTION(mon_leveldb_log, OPT_STR, "")
-OPTION(mon_leveldb_size_warn, OPT_U64, 40*1024*1024*1024) // issue a warning when the monitor's leveldb goes over 40GB (in bytes)
 OPTION(mon_force_quorum_join, OPT_BOOL, false) // force monitor to join quorum even if it has been previously removed from the map
 OPTION(paxos_stash_full_interval, OPT_INT, 25)   // how often (in commits) to stash a full copy of the PaxosService state
 OPTION(paxos_max_join_drift, OPT_INT, 10) // max paxos iterations before we must first sync the monitor stores
index bbe98e1485a6bba051f5cd30b9592978633bfd99..44f176a96a65c0dd2ebd3f8843ccf9f969d58495 100644 (file)
@@ -95,7 +95,7 @@ health_status_t DataHealthService::get_health(
       health_detail = "low disk space!";
     }
 
-    if (stats.store_stats.bytes_total >= g_conf->mon_leveldb_size_warn) {
+    if (stats.store_stats.bytes_total >= g_conf->mon_data_size_warn) {
       if (health_status > HEALTH_WARN)
         health_status = HEALTH_WARN;
       if (!health_detail.empty())
@@ -103,7 +103,7 @@ health_status_t DataHealthService::get_health(
       stringstream ss;
       ss << "store is getting too big! "
          << prettybyte_t(stats.store_stats.bytes_total)
-         << " >= " << prettybyte_t(g_conf->mon_leveldb_size_warn);
+         << " >= " << prettybyte_t(g_conf->mon_data_size_warn);
       health_detail.append(ss.str());
     }