]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: tidy up mds_blacklist_interval
authorJohn Spray <john.spray@redhat.com>
Tue, 17 Oct 2017 22:06:07 +0000 (23:06 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Wed, 31 Jan 2018 21:19:59 +0000 (22:19 +0100)
Remove the misleading reference to this from the client
eviction page, it was never the right option to mention
there (my mistake).

Demote the option from LEVEL_ADVANCED to LEVEL_DEV as it
is hard to imagine a good reason for the user to change it.

Set a hard minimum of one hour, to make it harder to
corrupt` a system by setting it close to zero.

Remove the legacy definition of the field while we're at it.

Fixes: http://tracker.ceph.com/issues/21821
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 0d68d3513e03cc2400facf421e08c8a92cb2886a)

Conflicts:
    doc/cephfs/eviction.rst (trivial resolution of conflict resulting from
        0e43f0f01cd800fee4cd800f1545405b449fa55b being merged to luminous)

doc/cephfs/eviction.rst
src/common/legacy_config_opts.h
src/common/options.cc
src/mon/MDSMonitor.cc

index f2f6778d1020a6a8d18c80047933d6fea2cf10f3..1bab7a127e325bbea30ff5b0dd2c3ad190994799 100644 (file)
@@ -136,12 +136,6 @@ eviction command to each active daemon.  When blacklisting is enabled
 (the default), sending an eviction command to just a single
 MDS is sufficient, because the blacklist propagates it to the others.
 
-Advanced options
-================
-
-``mds_blacklist_interval`` - this setting controls how many seconds
-entries will remain in the blacklist for.
-
 
 .. _background_blacklisting_and_osd_epoch_barrier:
 
index 178284d4ff98f89b8258f747bc2beb3c8151c5a0..f8d5d5053d6b49e71103af089c9fc07a12fef7cf 100644 (file)
@@ -432,7 +432,6 @@ OPTION(mds_decay_halflife, OPT_FLOAT)
 OPTION(mds_beacon_interval, OPT_FLOAT)
 OPTION(mds_beacon_grace, OPT_FLOAT)
 OPTION(mds_enforce_unique_name, OPT_BOOL)
-OPTION(mds_blacklist_interval, OPT_FLOAT)  // how long to blacklist failed nodes
 
 OPTION(mds_session_timeout, OPT_FLOAT)    // cap bits and leases time out if client unresponsive or not returning its caps
 OPTION(mds_session_blacklist_on_timeout, OPT_BOOL)    // whether to blacklist clients whose sessions are dropped due to timeout
index 0469939ab737a982c636db64b5a4d9eb613cf452..d12df8a58ce03e5d3206ec91c3c1807b06aaf4db 100644 (file)
@@ -1386,7 +1386,14 @@ std::vector<Option> get_global_options() {
 
     Option("mon_osd_blacklist_default_expire", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
     .set_default(1_hr)
-    .set_description(""),
+    .set_description("Duration in seconds that blacklist entries for clients "
+                     "remain in the OSD map"),
+
+    Option("mds_blacklist_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
+    .set_default(1_day)
+    .set_min(1_hr)
+    .set_description("Duration in seconds that blacklist entries for MDS "
+                     "daemons remain in the OSD map"),
 
     Option("mon_osd_crush_smoke_test", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
     .set_default(true)
@@ -5895,10 +5902,6 @@ std::vector<Option> get_mds_options() {
     .set_default(true)
     .set_description(""),
 
-    Option("mds_blacklist_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
-    .set_default(24.0*60.0)
-    .set_description(""),
-
     Option("mds_session_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
     .set_default(60)
     .set_description(""),
index 4643afdbd91e828b00b804ecad57f739fe589d23..31869d2161fcb7d3a11ee7abb515edd804fe7e6f 100644 (file)
@@ -710,7 +710,7 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
               << info.rank << " damaged" << dendl;
 
       utime_t until = ceph_clock_now();
-      until += g_conf->mds_blacklist_interval;
+      until += g_conf->get_val<double>("mds_blacklist_interval");
       const auto blacklist_epoch = mon->osdmon()->blacklist(info.addr, until);
       request_proposal(mon->osdmon());
       pending_fsmap.damaged(gid, blacklist_epoch);
@@ -1217,7 +1217,7 @@ bool MDSMonitor::fail_mds_gid(mds_gid_t gid)
   epoch_t blacklist_epoch = 0;
   if (info.rank >= 0 && info.state != MDSMap::STATE_STANDBY_REPLAY) {
     utime_t until = ceph_clock_now();
-    until += g_conf->mds_blacklist_interval;
+    until += g_conf->get_val<double>("mds_blacklist_interval");
     blacklist_epoch = mon->osdmon()->blacklist(info.addr, until);
   }