From: John Spray Date: Wed, 16 Mar 2016 12:49:51 +0000 (+0000) Subject: mon: config setting to skip FSMap::sanity X-Git-Tag: v10.1.1~114^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c6623c0aa4b45108c8bf66e266af9c7914937dea;p=ceph.git mon: config setting to skip FSMap::sanity Only for use in extremis, where we have encountered a bug that generates an invalid FSMap, but the way to resolve it might be to proceed anyway and stay up long enough to use commands to fix it. Fixes: #15063 Signed-off-by: John Spray --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index aea9c169b63a..3862b669f54d 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -312,6 +312,7 @@ OPTION(mon_osd_min_down_reporters, OPT_INT, 2) // number of OSDs from differen OPTION(mon_osd_reporter_subtree_level , OPT_STR, "host") // in which level of parent bucket the reporters are counted OPTION(mon_osd_force_trim_to, OPT_INT, 0) // force mon to trim maps to this point, regardless of min_last_epoch_clean (dangerous, use with care) OPTION(mon_mds_force_trim_to, OPT_INT, 0) // force mon to trim mdsmaps to this point (dangerous, use with care) +OPTION(mon_mds_skip_sanity, OPT_BOOL, false) // skip safety assertions on FSMap (in case of bugs where we want to continue anyway) // monitor debug options OPTION(mon_debug_deprecated_as_obsolete, OPT_BOOL, false) // consider deprecated commands as obsolete diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 7c37840da0ea..762abaa27454 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -144,7 +144,9 @@ void MDSMonitor::update_from_paxos(bool *need_bootstrap) // new map dout(4) << "new map" << dendl; print_map(fsmap, 0); - fsmap.sanity(); + if (!g_conf->mon_mds_skip_sanity) { + fsmap.sanity(); + } check_subs(); update_logger(); @@ -170,7 +172,9 @@ void MDSMonitor::encode_pending(MonitorDBStore::TransactionRef t) // print map iff 'debug mon = 30' or higher print_map(pending_fsmap, 30); - pending_fsmap.sanity(); + if (!g_conf->mon_mds_skip_sanity) { + pending_fsmap.sanity(); + } // Set 'modified' on maps modified this epoch for (auto &i : fsmap.filesystems) {